Forum Moderators: coopster

Message Too Old, No Replies

returning a list of URL's off a web page ....

Is it possible in PHP?

         

bobhoskins

2:57 pm on May 16, 2005 (gmt 0)

10+ Year Member



Hi there,

Is it possible to create a script which returns to screen a list of all links in a specified URL.

i've got a real mental block on this and can only think of using a search function to pick up on say, "http://" - which may work, but then how do i run the script with a specified URL.

i'll stop there before i start to confuse myself more .....

[edited by: jatar_k at 4:34 pm (utc) on May 16, 2005]
[edit reason] no urls thanks [/edit]

mcibor

9:48 pm on May 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think this is not such a hard thing to do. As I understand the page to read will be a normal html page, not a text file. Then just read it as a file and show everything between each "<a" and the following "</a>"
This is the stupid script (no styling included) however it may be a start.

To find all the occurences of <a you can use strpos function [pl2.php.net...]

Hope this helps
Michal Cibor