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

  • Home
  • SEARCH
  • 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

Related Questions

I am trying use MySql and Entity Framework, using Connector/Net 6.1 with this as
I am trying use the jQuery table sorter plugin for a table that is
I'm trying use mod_rewrite to rewrite URLs from the following: http://www.site.com/one-two-file.php to http://www.site.com/one/two/file.php The
Trying to use make from cygwin using g++ I was getting Access Denied error
Trying to use the http://www.dinnermint.org/css/creating-triangles-in-css/ method to create an arrow _________________ \ \ \
I'm trying use make a div's background transparent using a mixture of CSS3 rgba()
Trying to use an excpetion class which could provide location reference for XML parsing,
Trying to use a guid as a resource id in a rest url but
While trying to use LINQ to SQL I encountered several problems. I have table
I' trying to use a Linq query to find and set the selected value

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.