Results 1 to 3 of 3
-
2nd Sep 2011, 03:31 PM #1OPMember
PHP CURL LulzImg Uploader
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($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';
?>
Code:php lulzimg.php image.jpg link.txt
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
-
2nd Sep 2011, 03:39 PM #2It begins...
Good job. However, what you've coded is a script that can only be called from command line. You could code another that can actually be used via a normal browser call. Use the $_GET server vars to get the data (or $_POST if you plan on expanding it) and upload to the app.php
-
2nd Sep 2011, 03:43 PM #3OPMemberGood job. However, what you've coded is a script that can only be called from command line. You could code another that can actually be used via a normal browser call. Use the $_GET server vars to get the data (or $_POST if you plan on expanding it) and upload to the app.php
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[req] php curl filepost.com uploader
By heppinnz in forum Web Development AreaReplies: 23Last Post: 7th Jan 2012, 06:11 PM -
LulzImg Image Uploader in PHP
By BlaZe in forum Web Development AreaReplies: 1Last Post: 11th Dec 2011, 07:09 AM -
[Help] PHP Curl Uploader to RapidShare Problem
By heppinnz in forum Web Development AreaReplies: 2Last Post: 29th Nov 2011, 06:28 AM -
[Hiring] Paid Uploader - MagikalMusic.com - Uploader for Music Albums
By Young Star-G in forum Completed TransactionsReplies: 10Last Post: 18th Oct 2010, 07:43 PM -
fileserver error uploader file & image uploader
By logitec100 in forum Webmaster ResourcesReplies: 0Last Post: 16th Sep 2010, 10:05 PM
themaManager - edit and manage...
Version 4.05 released. Open older version (or...