Skip to content
Create a gist now

Instantly share code, notes, and snippets.

$id = $argv[1];
$url = "";
$values = array("entry_id" => $id, "value" => "1");
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $values);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($curl);
$result = json_decode($response);
if($result->status == 200) {
echo 'vote counted for ' . $id;
} else {
echo 'umm... something went wrong?';
echo "\n";
} while(true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.