Home > PHP > Remote Upload To Imageshack.Us With PHP+cURL

Remote Upload To Imageshack.Us With PHP+cURL


Advertisement



PHP supports libcurl since V 4.0.2, a library created by Daniel Stenberg (more information go here), that allows you to connect and communicate to many different types of servers with many different types of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also be done with PHP’s ftp extension), HTTP form based upload, proxies, cookies, and user+password authentication.

Now with cURL we trying to make a script that post images to Imageshack.Us via remote upload and return direct link of images. Here the source code to download.

Update Scipt! Please download new version – 20 December 2009.

Download Code

Pass : smileylover.com

This script should work and return direct link of images that being upload. If the result is empty (error with cURL) it will return Something went wrong with Imageshack?, but if result is empty for preg_match_all function it will return Imageshack.Us Remote Upload Failed Because They Change Layout Again! and send email to your email. Just announcement.

Usually, there’s an error with preg_match_all because Imageshack.Us is change their HTML tag regularly (i think) to avoid script like this (Hey with this script same with block their ads :p ). If an error occurs just come back to here to get update with working script.

DEMO

Regards.

nb: i prefer imageshack.us because they have a lot of bandwith. they allow us to use their bandwith 300MB/hour per single image!

Related posts:

  1. Text2Image (PNG) Generator – Free Online Generator – Free Download!
  2. Change Adsense Publisher ID In Other Site With PHP and cURL
  1. Admin
    November 11th, 2008 at 19:16 | #1

    Hmm … maybe u can try to contact admin and ask to install this script and setting it correctly :)

  2. November 12th, 2008 at 10:09 | #2

    i just checked with my host and cURL is supported!

    any idea about what is the problem?

    thanks

  3. Admin
    November 12th, 2008 at 15:17 | #3

    @ameo ..

    Ur hosting like my own :p

    they have disabled some option for return file back . like open base dir .. so i must contact admin and they open it for me …

    even if cURL is enabled but not feature opened .. please contact ur admin and asking for help :)

    btw can i see ur place where script installed?

    regards …

  4. November 12th, 2008 at 17:47 | #4
  5. December 29th, 2008 at 02:06 | #5

    Thanks for that ..

    i had put it on my site .. but every time i try to batch a pic , this message appear ! :
    Warning! Image type not valid or supported.

    it appears on my site only .. i tryed all image types jpg, png, bmp, gif .. !!

    what’s the problem ?

  6. thy92
    January 6th, 2009 at 19:28 | #6

    I get the message “Warning! Image type not valid or supported.”

    Does it need special file permissions or something ?

  7. Admin
    January 7th, 2009 at 15:54 | #7

    @ thy92
    do ur hosting support curl?
    u can try with free hosting at free hostia or 000webhost :)

  8. The Dude
    January 23rd, 2009 at 23:41 | #8

    The script keeps processing forever for me. I have CURL installed for sure.

    What other functions required?

  9. January 24th, 2009 at 05:20 | #9

    Can you make the direct links to output in a multiple line box instead of single boxes cause when you’re batch uploading 100+ images you don’t want to copy 100+ links one by one =[

  10. February 6th, 2009 at 07:38 | #10

    Thanks for this script. And to all commenters, please do not request to need modified for your own need. Its better that admin want to share this script even its basic one. If you guys wanna more nice and functioning script, just find freelancer to done this.

    Thumb up for admin :D

Comment pages
  1. No trackbacks yet.