Skip to content

Instantly share code, notes, and snippets.

@dol
Created November 11, 2014 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dol/32697e5e73bb5d83fda9 to your computer and use it in GitHub Desktop.
Save dol/32697e5e73bb5d83fda9 to your computer and use it in GitHub Desktop.
Curl + AWS IPv6 lookup test
<?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