PHP get_meta_tags("http://www.mywebsite.com") returns Empty

Username

Webjective

Error Message

I have 2 websites, 1 hosted InfinityFree and 1 in another hosting.
I have build my InfinityFree website with a couple of meta tags, example:

I want my external website to access those meta tags.

When I use get_meta_tags(“localhostweb”) in works perfectly, but when I use get_meta_tags(“http://www.mywebsite.com”) it returns and Empy Array.

Why is it?

Webjective[email protected]

CORS restriction? You need premium hosting then…

This could be the reason…

3 Likes

Is there a way to bypass it? I mean, my goal is to retrieve the meta tags from my site allocated at InfinityFree, in order to be used in my other site.

More specifically, I need Title and Description to be automatically received from different sites in different hostings to be printed on my main site. Like a list of sites with their Titles and Descriptions.

Not officially.

You could of course decide to store the data elsewhere, like on a file host or on GitHub, and fetch that from both websites.

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.