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