4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: ajh287sjhsdbsdasd on October 02, 2007, 02:58:00 AM

Title: Implementing imageshack transload script - ?
Post by: ajh287sjhsdbsdasd on October 02, 2007, 02:58:00 AM
I'd like to have 4images set up to where when someone uploads an image, it gets sent to the imageshack server. Is this possible? Does anyone know how to go about doing it and what files I need to modify?

I have the transload scripts that I've used elsewhere (on another site) if that helps:

function uploadURLToImageshack($url) {
   $ch = curl_init("http://imageshack.us/transload.php");

   $post['xml']='yes';
   $post['url']=$url;

    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_HEADER, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 60);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect: '));

    $result = curl_exec($ch);
    curl_close($ch);

    if (strpos($result, '<'.'?xml version="1.0" encoding="iso-8859-1"?>') === false) {
       return 'failed';
    } else {
        return $result; // XML data
   }
}


Thanks
Title: Re: Implementing imageshack transload script - ?
Post by: thunderstrike on October 02, 2007, 02:59:27 AM
Is your server support cURL ?

If no have answer - go to: ACP - > phpinfo() and check for cURL extention.
Title: Re: Implementing imageshack transload script - ?
Post by: thunderstrike on October 02, 2007, 03:30:35 AM
Ok file you need edit is member.php and admin/validateimages.php file.
Title: Re: Implementing imageshack transload script - ?
Post by: thunderstrike on October 02, 2007, 03:38:28 AM
Your question is which file edit and no to add code. :?

If need integrate, please post in request for paid for custom job.
Title: Re: Implementing imageshack transload script - ?
Post by: thunderstrike on October 02, 2007, 03:46:58 AM
Ok - here:

http://www.4homepages.de/forum/index.php?topic=11412.0

Is look like is done in past.