PHP CURL LulzImg Uploader
I started learning PHP and decided to share with you my first script:
Usage:
Have a Nice Day !!!
I started learning PHP and decided to share with you my first script:
PHP:
<?php
/*
PHP CURL LulzImg Uploader
@author: heppinnz
@site: http://musicdl.org/
*/
$file = $argv[1];
$link = $argv[2];
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 5.1; rv:6.0.1) Gecko/20100101 Firefox/6.0.1");
curl_setopt($ch, CURLOPT_URL, "http://lulzimg.com/app.php");
curl_setopt($ch, CURLOPT_POST, true);
$post = array(
"image" => "@".$file,
"uploadtype" => "image",
"submit" => ""
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$result = curl_exec($ch);
curl_close($ch);
file_put_contents($link, $result);
echo 'Image Uploaded to Lulzimg.com';
?>
Usage:
Code:
php lulzimg.php image.jpg link.txt
Have a Nice Day !!!