2019-09-06 23:53:10 +08:00

13 lines
364 B
PHP
Executable File

<?php
$fp = fopen (__DIR__. '/test.html', 'w+');
$ch = curl_init("http://127.0.0.1/index.php");
curl_setopt($ch, CURLOPT_TIMEOUT, 50);
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
// write curl response to file
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
// get curl response
curl_exec($ch);
curl_close($ch);
fclose($fp);