Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Good Morning Team,
I have a headache I cannot solve, I am trying to use php code to find a url on a webpage can anyone help please, this is how far I have got with no success...Code: Select all
<?php
$aText ='http://www.sapphire-team.com';
$aUrl = 'http://www.highforce.com/resource/Business-Directories-and-Search-Engines.html';
$filepointer = fopen ( $aUrl, "r" );
if ( $filepointer )
{
while ( ! feof ( $filepointer ) )
{
$buffer = fgets ( $filepointer, 4096 );
$file .= $buffer;
}
$pattern = '^$aText^i';
$a = preg_match($pattern, $file);
if ($a) { echo "Found the frigging link at last!"; }
else {echo "link not found";}
}
?>feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]