4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started 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
-
Is your server support cURL ?
If no have answer - go to: ACP - > phpinfo() and check for cURL extention.
-
Ok file you need edit is member.php and admin/validateimages.php file.
-
Your question is which file edit and no to add code. :?
If need integrate, please post in request for paid for custom job.
-
Ok - here:
http://www.4homepages.de/forum/index.php?topic=11412.0
Is look like is done in past.