PHP CURL LulzImg Uploader

I started learning PHP and decided to share with you my first script:

PHP Code: 
<?php

    
/* 
        PHP CURL LulzImg Uploader
        @author: heppinnz
        @site: http://musicdl.org/
    */

    
$file $argv[1];
    
$link $argv[2];

    
$ch curl_init();
    
curl_setopt($chCURLOPT_HEADER0);
    
curl_setopt($chCURLOPT_VERBOSE0);
    
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
    
curl_setopt($chCURLOPT_USERAGENT"Mozilla/5.0 (Windows NT 5.1; rv:6.0.1) Gecko/20100101 Firefox/6.0.1");
    
curl_setopt($chCURLOPT_URL"http://lulzimg.com/app.php");
    
curl_setopt($chCURLOPT_POSTtrue);
        
$post = array(
            
"image" => "@".$file,
            
"uploadtype" => "image",
            
"submit" => ""
        
);
    
curl_setopt($chCURLOPT_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 !!!
heppinnz Reviewed by heppinnz on . PHP CURL LulzImg Uploader PHP CURL LulzImg Uploader I started learning PHP and decided to share with you my first script: <?php /* PHP CURL LulzImg Uploader @author: heppinnz @site: http://musicdl.org/ Rating: 5