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:
<div id="somediv">
<a href="http://yahoo.com" class="url">Yahoo</a>
<a href="http://google.com" class="url">Google</a>
<a href="http://facebook.com" class="url">Facebook</a>
</div>
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.