Skip to content

Instantly share code, notes, and snippets.

@crakaC
Created July 14, 2014 16:06
Show Gist options
  • Save crakaC/3968cc40b02fb01ec31e to your computer and use it in GitHub Desktop.
Save crakaC/3968cc40b02fb01ec31e to your computer and use it in GitHub Desktop.
echo Yo script
<?php
$url = "http://api.justyo.co/yo/";
$token = <API_TOKEN>;
$data = array(
'api_token'=> $token,
'username'=>$_GET["username"],
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$result = curl_exec($ch);
curl_close($ch);
echo $result;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment