Status
Not open for further replies.

codebreaker911

Active Member
111
2011
20
30
Hi, I am planning to make a small tool that will remote upload images to Lulzimg. I have searched a lot, but didn't find any API for remote upload using Lulzimg service.

Can anyone plz tell me where I can find API for Lulzimg? I use vb.net for developing tools.

Thanks
 
14 comments
there API exists but i dont think its public and not with a lot of options, contact 'Lifetalk' for information.
Although it is fairly easy to upload images to lulzimg programmatically, just check the headers while you remote upload some image.
 
there API exists but i dont think its public and not with a lot of options, contact 'Lifetalk' for information.
Although it is fairly easy to upload images to lulzimg programmatically, just check the headers while you remote upload some image.

Hi, thanks for your quick reply. I tried to find that using fiddler, but not clear about the data request. I found the url http://lulzimg.com/upload.php but not sure how to implement the remote upload option with this url.

Thanks
 
u need to send request this way and then use regex or xpath to get image url:
PHP:
http://www.lulzimg.com/upload.php?submit=lulz&url=http://domain.com/logo.png
 
u need to send request this way and then use regex or xpath to get image url:
PHP:
http://www.lulzimg.com/upload.php?submit=lulz&url=http://domain.com/logo.png


Thanks a lot, this is exactly what I was looking for. Since API is not available publicly, this will work. Any idea how to use it for multiple images?

Thanks again.
 
PHP:
<form action="" method="post">
<p>
<br /><input width="80" name="imglinks"><br />
</p>
<p>
<input type="submit" value="Upload Image" />
</p>
</form>
<?php
if (!empty($_POST['imglinks']))
{
$ch = curl_init();
$imglinks=$_POST['imglinks'];
curl_setopt($ch, CURLOPT_URL,"http://www.lulzimg.com/upload.php?submit=lulz&url=$imglinks");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
$data = curl_exec($ch);
curl_close($ch);

preg_match_all("/http:\/\/i28.lulzimg.com\/[a-z0-9]+\/[a-z0-9A-Z.]+/", $data, $matches);


$break[]=$matches[0];
echo "LULZ Share Link -";
echo $break[0][0];
echo "</br>";
echo "Direct Layout Links -";
echo $break[0][1];
echo "</br>";

}
?>
 
@hq320 cool script but your regex is not good, what if there is another server instead of i28? and u dont need to use BINARYTRANSFE or cookies in curl.
here one improvment in your script.
PHP:
 preg_match('#\[IMG\](.*)\[\/IMG\]#', $data, $matches); 
$image = $matches[1];
 
Thanks, i find it on my hdd ;)
This one is not my coded.
I have almost same script running with nfo2png + upload to lulz site ;)

Thanks for regex tip.
 
Just done a quick test on vb and it works nicely with single image, now trying to figure out how to do that for multiple images with single request.

g1alf.png
 
It's not related to lulzimg but if your still having trouble and need a real image API http://api.imgur.com/http://imgur.com has a great API with loads of demo code and php classes available. It allows uploading to accounts, folders, delete images etc. I've used it a lot without any issues.

Hi, I have already made tool using imgur and imageshack API. They both have nice API, now trying to work on lulzimg. Preparing a simple Image Remote uploading AIO. Will share that on forum after it completes.

Thanks
 
Status
Not open for further replies.
Back
Top