Skip to content

@citricsquid /gist:4d8a0249b3c2af6338aa secret
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
<?php
$id = $argv[1];
$url = "http://thejuicyj.com/scholarship/entries/vote/index.php";
$values = array("entry_id" => $id, "value" => "1");
do{
$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);
curl_close($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.