Hi all,
The following is a sample code I try to extract URL from a Web Page.Its not finding
any match.Any idia why ?
Kindly let me know.
Thanks to all.
chinmay.
***********************************************************
$fp = fopen('http://yahoo.com/','r') or die ("Cannot connect");
while($line = fgets($fp,1024))
{
if(preg_match_all('/<.*?a.*?href=\s*?[\'"](.+)[\'"].*?>.*?<\/.*?a.*?>/i',$line,$matches))
{
array_shift($matches);
foreach($matches as $match)
{
$url_list = $match;
echo $match;
}
}
}
********************************************************
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]