Thread: Wrong output
View Single Post
Old 05-22-2009, 08:54 AM   #2 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

Here's a little comparison. It grabs the remote file and echoes the value from currentPage="value".


PHP Code:
$html file_get_contents('http://www.url.com'FALSENULL0140);

if (
preg_match('/\bcurrentPage="(.+?)"/i'$html$matches))
{
    echo 
$matches[1];
}
else
{
    echo 
'No currentPage found.';

Salathe is offline  
Reply With Quote