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 194767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T16:37:24+00:00 2026-05-11T16:37:24+00:00

I am trying to use YFrog’s API. I think I am using it correctly

  • 0

I am trying to use YFrog’s API. I think I am using it correctly to try and send a HTTP POST request that is of content type XML. However, as the response body, I am always getting a 404 error for some reason. Here is their API.

Here is my attempt of PHP code to upload.

 $data = array('media' => 'http://img253.imageshack.us/my.php?image=bfab82a545d414uo.jpg', 'username' => 'asc', 
    'password' => 'asc', 'message' => 'hi');

$url = 'http://example.com/api/uploadAndPost';

$req = new HTTPRequest($url);
$req->addHeaders(array("Content-Type" => "text/xml")); 
$req->setMethod(HTTP_METH_POST); 
$req->addQueryData($data); $req->send();
echo $req->getResponseBody();

Also for the media it says “Binary image data” does that mean a URL of the image location can not be passed to it? What does it mean?

  • 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-11T16:37:24+00:00Added an answer on May 11, 2026 at 4:37 pm

    I think that the problem is basically that ImagesHack does not return a binary file when you give the URL posted above. For me, it returns an HTML document.

    I think you should try passing a binary file as the “media” parameter. The photo that your trying to get is located at http://img253.imageshack.us/img253/172/bfab82a545d414uo.jpg, use this URL instead.

    This is the response that I get with the one you originally tried:

    HEAD /my.php?image=bfab82a545d414uo.jpg HTTP/1.1
    Host: img253.imageshack.us
    
    HTTP/1.1 200 OK
    X-Powered-By: PHP/5.2.6
    Set-Cookie: nopopunder=1; expires=Thu, 07-May-2009 11:10:21 GMT; path=/; domain=.imageshack.us
    X-UA-Compatible: IE=EmulateIE7
    Content-type: text/html
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 151k
  • Answers 151k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here's a general article outlining the process: http://www.techbriefs.com/content/view/2579/32/ This is… May 12, 2026 at 10:00 am
  • Editorial Team
    Editorial Team added an answer ReportSurfer.com is also very good. May 12, 2026 at 10:00 am
  • Editorial Team
    Editorial Team added an answer Do your files have any spacing or indentation? That could… May 12, 2026 at 10:00 am

Related Questions

I am trying to use YFrog's API. I think I am using it correctly
I am trying to use MinGW to compile a C program under Windows XP.
I am trying to use a stringstream object in VC++ (VStudio 2003) butI am
I am trying to use the InternalsVisibleTo assembly attribute to make my internal classes
I am trying to use forms authentication with Active Directory but I need roles

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.