With recent PHP versions, using file_get_contents() is a very efficient method to get and parse stuff from the web
$vOpts = array(‘http’=>
array(‘method’=>”GET”,’header’=>$vHeaders)
);
$vContext = stream_context_create($opts);
$vURL = ‘https://private.example.com’;
$vPage = file_get_contents($vURL,FALSE,$vContext);
You could set headers like custom user-agent string, cookie variables, just like a “real” browser.
Leave a Reply