} else { $mo_y = $imheight / 3 * 2 - 22; } switch ($_GET['twitter_username']) { case 'cutegecko': // 135, 210 $dstx = 150; $dsty = 95; break; case 'seanyo': //210, 200 $dstx = 193; $dsty = 160; break; case 'robdrimmie': //210, 200 $dstx = 250; $dsty = 170; break; } $imgur = new Imgur(); $original = $imgur->upload($im); imagecopy($im, $stache, $mo_x, $mo_y, 0, 0, 80, 45); $moified = $imgur->upload($im); //header("Content-type: image/png"); //imagepng($im); imagedestroy($im); echo "<br /><br /><br />"; echo "<h2>database</h2>"; $db = new Moify_DB(); $db->add($twitter_username, $original['upload']['links']['original'], $moified['upload']['links']['original'], $mo_file, $mo_y, $mo_x);
$imgur->message()->create($options); $imgur->message()->delete($id); $imgur->message()->message_count(); $imgur->message()->get_thread($id); //... /*-----------------------------------------------------------------------------------*/ /* Gallery /*-----------------------------------------------------------------------------------*/ $imgur->gallery()->get($section, $sort, $page); //More on the parameters at Imgur API docs $imgur->gallery()->comments($id, $type); //$type = "image" | "album"; $imgur->gallery()->search($str); $imgur->gallery()->remove($id); $imgur->gallery()->submit($id, $options, $type); $imgur->gallery()->votes($id, $type); $imgur->gallery()->vote($id, $type, $vote); //... /*-----------------------------------------------------------------------------------*/ /* Uploading /*-----------------------------------------------------------------------------------*/ $imgur->upload()->file("/path/to/file", $postfields); //Postfields look in http://api.imgur.com/endpoints/image#image-upload $imgur->upload()->string("base64encodedstring,{$postfields}"); $imgur->upload()->url("http://urlofimage.com", $postfields); /*-----------------------------------------------------------------------------------*/ /* Notifications /*-----------------------------------------------------------------------------------*/ $imgur->notification()->all(); $imgur->notification()->single($id); $imgur->notification()->mark_as_read($id);