Skip to content

Instantly share code, notes, and snippets.

View hamada147's full-sized avatar
🎯
Focusing

Ahmed Moussa hamada147

🎯
Focusing
View GitHub Profile
@hamada147
hamada147 / imgur.php
Last active September 21, 2015 08:34 — forked from scottydelta/imgur.php
A php script to upload images to Imgur anonymously using Imguy API V3. The input is an image and Output is a direct ink.
<?php
$client_id = 'xxxxxxxx';
$file = file_get_contents("test-image.png");
$url = 'https://api.imgur.com/3/image.json';
$headers = array("Authorization: Client-ID $client_id");
$pvars = array('image' => base64_encode($file));
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL=> $url,
@hamada147
hamada147 / crypt.class.php
Last active September 10, 2015 09:07 — forked from joshhartman/crypt.class.php
Rijndael 256-bit Encryption (CBC) Class
<?php
class Crypt {
private $key;
function __construct($key){
$this->setKey($key);
}