Forum Moderators: coopster
Here's my code so far:
<?php
$context=array('http' => array ('header'=> 'Range: bytes=1024-', ),);
$xcontext = stream_context_create($context);
$test=file_get_contents("http://www.example.com",FALSE,$xcontext);
print <<<EOF
$test
EOF;
?>
// thats a thread that i created, i think i did the exact same thing as you, just look at my source code and see if you can make sense of it.
home it helps, good luck!
To get you started:
<?php
$context=array('http' => array ('header'=> 'Range: bytes=1024-', ),);
$xcontext = stream_context_create($context);
$test=file_get_contents("http://www.example.com",FALSE,$xcontext);
$pattern = '/\<a\ href\=\"([^"]+)\"\>([^<]+)\<\/a\>/i';
echo preg_match_all($pattern, $test, $matches);
print_r($matches);
?>
Although, in my research I came across some interesting stuff about the PHP DOM functions [php.net] and how those can be used for getting data out of an HTML string.