Last active
January 24, 2018 21:14
-
-
Save croensch/950814d01626df90ef40901c2fda9fc4 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 | |
$c = curl_init(); | |
curl_setopt_array($c, array( | |
CURLOPT_URL => $argv[1], | |
CURLOPT_RETURNTRANSFER => 1, | |
CURLOPT_VERBOSE => true | |
)); | |
$r = curl_exec($c); | |
if (curl_errno($c)) { | |
die(curl_error($c)); | |
} | |
curl_close($c); | |
echo substr($r, 0, strpos($r, "\n", 256)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment