- var_dump: documentation ( source)
- stream_context_create: documentation ( source)
- stream_get_contents: documentation ( source)
- fopen: documentation ( source)
<?php
$context = stream_context_create(array('http' => array('follow_location' => 1, 'max_redirects' => 1)));
$fp = fopen('http://google.com', 'r', false, $context);
var_dump(stream_get_contents($fp));