Last active
February 9, 2018 20:07
-
-
Save deconf/dafa7b42182a6d0b5838260f7b510ea5 to your computer and use it in GitHub Desktop.
GADWP Endpoint 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 | |
/** | |
* Author: Alin Marcu | |
* Copyright 2018 Alin Marcu | |
* Author URI: https://deconf.com | |
* License: GPLv2 or later | |
* License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ | |
$curl = curl_init(); | |
curl_setopt( $curl, CURLOPT_URL, 'https://gadwp.deconf.com' ); | |
curl_setopt( $curl, CURLOPT_USERAGENT, 'GADWP Test' ); | |
curl_setopt( $curl, CURLOPT_FOLLOWLOCATION, false ); | |
curl_setopt( $curl, CURLOPT_SSL_VERIFYPEER, true ); | |
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, true ); | |
curl_setopt( $curl, CURLOPT_HEADER, true ); | |
$response = curl_exec( $curl ); | |
if ( $response === false ) { | |
$error = curl_error( $curl ); | |
$code = curl_errno( $curl ); | |
echo 'Error: ' . $code . ' - ' . $error; | |
} else { | |
print_r( $response ); | |
} | |
die(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment