Thursday, 6 October 2016

html - get contents from another page using php?

I'm not sure this is possible or not.
I want a php script when executed , it will go to a page (on a different domain) and get the html contents of it and inside the html there's links , and that script is able to get each link's href.



html code:






The output code(which php will echo out) will be
http://yahoo.com
http://google.com
http://facebook.com



I have heard of cURL in php can do something like this but not exactly like this , i'm a bit confused , i hope some can guide me on this.



Thanks.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...