php - Preparing GD dynamic image for upload -


how can prepare dynamic image created gd upload?

i created php script create dynamic images based on userid (ex: www.mywebsite.com/image/124.png <== should show user 124 info)

now need upload facebook script :

$photo_details = array(     'message'=> $message ); $file = "$_get[id].png"; $photo_details['image'] = '@/home/username/public_html/image/' . $file; $upload_photo = $facebook->api('/'.$album_uid.'/photos', 'post', $photo_details); 

when use upload script way error:

fatal error: uncaught curlexception: 26: failed creating formpost data

but if uploaded 124.png /image/ directory , and tried same code again using id 124 works fine. after long research came conclusion problem relay in dynamic part since works fine static images. how can solve problem?

thank help.

looks script tries read file directly filesystem instead of running image generating script. can solve setting $photo_details['image'] = 'http://www.mywebsite.com/image/'.$file; if facebook class allows kind of file opening.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -