Skip to content
WJunction - Webmaster Forum

LulzImg Image Uploader in PHP

Status
Not open for further replies.

BlaZe

Distinguished Member
Veteran
3,985
2009
767
This is a simple code snippet which will upload the images remotely to LulzImg.com. It won’t upload the image from your computer, but you can put the remote image URL to upload. Alternately, you can use the code snippet in your project/scripts. I hope that it comes handy for few people who wanna remote upload on lulzimg.com with PHP.

I have made a simple GUI for better understanding. Have a look at the demo here: LulzImg Uploader.

The basic code used for uploading (via cURL):

PHP:
<?php
$url = $_POST['url'];
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL,"http://www.lulzimg.com/upload.php?submit=lulz&url=$url");
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $data = curl_exec($ch);
        curl_close($ch);
        preg_match('#\[IMG\](.*)\[\/IMG\]#', $data, $matches);
        $image = $matches[1];
?>

Download the source file: http://mediafire.com/?7e4ply3a816fedt

Credits: automan & mRAza.
==========
Official API: http://www.wjunction.com/92-development-area/116805-lulzimg-api-sort-upload-example.html

Source: L337FX.com
 
Last edited:

1 comment

Status
Not open for further replies.

About the author

BlaZe
Distinguished Member · Joined
3,985
Messages
767
Reactions
113
Points
Grow your business

Advertise on WJunction

Connect with an established international community of webmasters, hosting providers, developers and online entrepreneurs.

  • Premium & Premium+ Sticky
  • Dedicated section banners
  • Site-wide banner advertising
Explore advertising options
Back
Top Bottom