Follow us on Twitter!
Ideas are far more powerful than guns.
Thursday, April 24, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 24
Guests Online: 22
Members Online: 2

Registered Members: 82903
Newest Member: Piriformis
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

cURL in PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 08-01-06 19:14
Since ImageShack sucks unless you buy some credits, I want to make a script that uploads images to ImageShack. Anyway, I am unable to upload an image! It always returns a '1' or the main page... but nothing else. Here's what I've got so far:
Code
$url = 'http://imageshack.us/index.php';

$postData = array();

$postData['fileupload'] = "@dire1.jpg";
$postData['submit'] = "UPLOAD";
$postData['MAX_FILE_SIZE'] = '3145728';
     
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url );       
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_USERAGENT, $ua);


curl_setopt($ch, CURLOPT_POSTFIELDS, $postData );

$response = curl_exec( $ch );
echo $response;
?>




Any ideas?
Author

RE: cURL in PHP


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 08-01-06 22:08
Because, by default, Imageshack does not allow you to upload multiple images at a time.