Created
November 11, 2014 16:25
-
-
Save dol/32697e5e73bb5d83fda9 to your computer and use it in GitHub Desktop.
Curl + AWS IPv6 lookup test
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 | |
# Requires PHP 5.5 | |
$ch = curl_init("https://sqs.eu-central-1.amazonaws.com/"); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
#curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
echo curl_exec($ch); | |
if($errno = curl_errno($ch)) { | |
$error_message = curl_strerror($errno); | |
echo "cURL error ({$errno}):\n {$error_message}"; | |
} | |
curl_close($ch); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment