Skip to content

Instantly share code, notes, and snippets.

@deconf
Last active February 9, 2018 20:07
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 deconf/dafa7b42182a6d0b5838260f7b510ea5 to your computer and use it in GitHub Desktop.
Save deconf/dafa7b42182a6d0b5838260f7b510ea5 to your computer and use it in GitHub Desktop.
GADWP Endpoint Test
<?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