I want to load content from a page hosted on another site.
The problem is that the target page doesn’t has an ID, but a class name.
So I built a sample proxy in PHP to get the HTML content using get_file_contents.
But what to do next?
Example:
<body>
<span class="news">NEWS FOR TODAY</span>
</body>
i want to get the content inside .news
If I did get you, you’re probably trying to print out/load only part of returned string, in this case .news. Try following
in php
and this in jquery
Try working demo