Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6473831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:30:48+00:00 2026-05-25T06:30:48+00:00

How can I prepare a dynamic image created by GD for upload? I created

  • 0

How can I prepare a dynamic image created by GD for upload?

I created a php script to create dynamic images based on the userid (EX: http://www.mywebsite.com/image/124.png <== that should show the user 124 info)

Now I need to upload it to Facebook with this 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 I use the upload script that way I get this error:

Fatal error: Uncaught CurlException: 26: failed creating formpost data

But If I uploaded 124.png to /image/ directory and and tried the same code again with using the ID 124 it works just fine. After a long research I came to conclusion the problem relay in the dynamic part since it works just fine with static images. How can I solve this problem?

Thank you so much for all the help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:30:49+00:00Added an answer on May 25, 2026 at 6:30 am

    Looks like the script tries to read the file directly from the filesystem instead of running the image generating script. You can solve this by setting $photo_details['image'] = 'http://www.mywebsite.com/image/'.$file; if Facebook class allows this kind of file opening.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my php script, it pulls record from DB then it creates dynamic checkbox
I get this error Can't create handler inside thread that has not called Looper.prepare()
In most cases when you create your thread you can prepare the data beforehand
How can I prepare the configuration settings (App.config, maybe?) I need to use Enterprise
How can I use dynamic SQL statements in MySQL database and without using session
I should create a query to pass to sqlite3_prepare_v2. The query must be dynamic,
I am trying to get started with MS Sharepoint. How can I prepare my
the following short test script <?php define('DBHOST', '/tmp'); define('DBNAME', 'XXX'); define('DBUSER', 'XXX'); define('DBPASS', 'XXX');
i have some threads in which i create some views and prepare them to
can we use absolute layout for designing. I need to prepare a mock-up demo

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.