Hello all,
I have just uploaded an image to imageshack using their API and I am trying to save that image path that I get back from imageshack.
$mgr->setUploadUrl('http://www.imageshack.us/index.php');
$fileImagePath = $row['cr_path'];
echo $fileImagePath.'<br><br>';
$res = $mgr->upload($row['cr_path'], 'image/jpeg', 'avaojo');
$newImagePath = explode(' ', $res);
$shackPath = trim($newImagePath[6]);
echo '>>>'.$shackPath.'<<<';
//Outputs >>>http://img194.imageshack.us/img194/5038/9444679.jpg<<<
$sql = "UPDATE avatar SET image_path = '$shackPath' WHERE avatar_id =".$row['cr_id'];
However, when I view my MySQL database it wraps around the URL string with <image_link></image_link>
tags?
What the hell is going on? I looked everywhere and in my script nothing resets the $shackPath variable. In fact, the insertion and the trimming of $newImagePath are only 3 lines away and nothing happens in between that!
Thanks all