I’d like to create a little webservice where you can input a link and it will get somehow the content of the linked site.
So, how could I do that? I actually do not have a single idea. If it is an iFrame, the user called the website in the end, but I want the server to do that, so that the user can’t see anything of this linked website.
It’s actually a function like facebook has, if you post a link, it gets the title, the content (text and images) and some tags. How does it do this?
Thanks for your answers!
Flo
In php you can use Curl :
Hope it helps.
Edit
Some sites require user agents :
A list of different ones can be found here
Update
$datais a string of the html page, so for the title :Would give you the page title (like in your example)
Facebook also relies on special meta tags :