Skip to content

Instantly share code, notes, and snippets.

@nooptr
Created January 29, 2018 02:41
Show Gist options
  • Save nooptr/6e5e8eb6bd1dd8ec21ee48d7539b3b46 to your computer and use it in GitHub Desktop.
Save nooptr/6e5e8eb6bd1dd8ec21ee48d7539b3b46 to your computer and use it in GitHub Desktop.
<?php
$ch = curl_init(URL);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// プロキシを無効に設定
curl_setopt($ch, CURLOPT_PROXY, "");
curl_setopt($ch, CURLOPT_PROXYPORT, "");
$execResult = curl_exec($ch);
$arr = json_decode($execResult, true);
var_dump($arr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment