I need to produce an array of all the links(hrefs) in a remote file
(actually those that refer to files in the same remote server, but thats
another matter).
I'm pretty new to php, i was thinking of doing it with ereg, something
like eregi(a href[\]?=(.*), $file, $link);
but i cannot think of a
I need to produce an array of all the links(hrefs) in a remote file
(actually those that refer to files in the same remote server, but thats
another matter).
I'm pretty new to php, i was thinking of doing it with ereg, something
like eregi(a href[\]?=(.*), $file, $link);
but i cannot think of a
Use preg_match_all('|a.*?href=(|'|)(.*?)(|')|i', $the_string,$the_matches);
var_dump($the_matches);
Regards,
Andrey Hristov
- Original Message -
From: Ando Saabas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 20, 2002 10:45 PM
Subject: [PHP] Extracting hyperlinks
: Re: [PHP] Extracting hyperlinks from file
Use preg_match_all('|a.*?href=(|'|)(.*?)(|')|i', $the_string,$the_matches);
var_dump($the_matches);
Regards,
Andrey Hristov
- Original Message -
From: Ando Saabas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 20
I need to produce an array of all the links(hrefs) in a remote file
(actually those that refer to files in the same remote server, but thats
another matter).
I'm pretty new to php, i was thinking of doing it with ereg, somethin
like
eregi(a href[\]?=(.*), $file, $link);
but i cannot think of a
Ando
I need to produce an array of all the links(hrefs) in a remote file
(actually those that refer to files in the same remote server, but thats
another matter).
I'm pretty new to php, i was thinking of doing it with ereg, something
like eregi(a href[\]?=(.*), $file, $link);
but i cannot
6 matches
Mail list logo