具体代码如下:

<?php
$opts = array(\'http\' => array(\'header\'=> \'Cookie: \' . $_SERVER[\'HTTP_COOKIE\'].\"\\r\\n\"));
$context = stream_context_create($opts);
/*  http://www.manongjc.com/article/1430.html */
$contents = file_get_contents(\'http://example.com/test1.txt\', false, $context);
echo $contents;
?>
收藏 打印