tags:

views:

494

answers:

3

Hi all, I was just wondering if anyone has used the imageshack api as i am trying to use it and i am having some issues as it just fails and will no upload my image.

the php library for image shack can be found here http://elliottback.com/wp/using-the-imageshack-xml-api/

i pass the for file element to the upload function but it just does not want to do it. does anyone have any ideas or any links with useful help? Cheers Mark

A: 

According to the API class code, the line 15:

curl_setopt($ch, CURLOPT_TIMEOUT, 240);

sets a maximum execution time for the cURL functions of 240 seconds (4 minutes).

That could be the possible error. Try setting that value to 600 seconds (10 minutes) and try again.

Also, the time needed to upload the file depends on the file size and on your internet's upload speed.

Also, showing us the code that you are using (besides that class) would be a HUGE help.

Pedro Cunha
+1  A: 

Hi All, It is fine it was a silly mistake i was making and sending the wrong information to the class

i was doing $_FILES['file']['name']

instead of the correct way which was

$_FILES['file']['tmp_name']

after i change that it was fine

markblue777
A: 

Check this post http://www.web-freelancer.keepern.com/99-imageshack-xml-api-script

It offers a ready-made scripts of Imageshake API XML

Abel Mendoza