Last active
September 19, 2018 06:19
-
-
Save cyyself/966a2e82f090c7da93539e759c8b0853 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$curl_cmd = trim(fgets(STDIN)); | |
$filename = md5($curl_cmd) . '.html'; | |
while (1) { | |
$ret = shell_exec($curl_cmd.' -w %{http_code} -o '. $filename .' -i'); | |
if ($ret != '503') break; | |
} | |
echo 'Saved to ' . $filename . "\n"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment