1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

image host uploading api help [PHP]

Discussion in 'Hire a Freelancer' started by sohom, Mar 10, 2015.

Thread Status:
Not open for further replies.
  1. sohom

    sohom Senior Member

    Joined:
    May 26, 2013
    Messages:
    990
    Likes Received:
    175
    Location:
    not in Past
    Hello
    I am in the need of knowledgeable person who worked with image hosting kinda sites, good in PHP

    See this picture
    [​IMG]

    main work is to figure out what will be the POST string to get the image uploaded successfully there

    need More details about site,etc ?
    just PM me

    Only looking for good iTrade Score users or jr.vip
     
  2. Robobugs

    Robobugs Newbie

    Joined:
    May 4, 2010
    Messages:
    7
    Likes Received:
    3
    A quick glance at your JSON string seems to indicate the form was not submitted with the correct ENCTYPE attribute. POST submissions that include files must have the enctype in the <form> as in this example:

    <form action="demo_post_enctype.asp"
    method="post" enctype="multipart/form-data">

    I would send a link to the documentation for HTML multipart forms, but I can't post links here. If you google search "html form multipart" and have a look at the w3schools result, it will explain a bit more about this attribute.

    Hope that helps.
     
  3. ralphnsk

    ralphnsk Newbie

    Joined:
    Nov 2, 2009
    Messages:
    43
    Likes Received:
    13
    Gender:
    Male
    Location:
    /dev/random
    I assume you're using CURL in PHP to upload that picture. In that case you should set the CURLOPT_HTTPHEADER option in the way similar to this:

    CURLOPT_HTTPHEADER => array("Content-Type:multipart/form-data");

    Then it will be a multipart request, as your image hosting site expects.
     
    • Thanks Thanks x 1
  4. sohom

    sohom Senior Member

    Joined:
    May 26, 2013
    Messages:
    990
    Likes Received:
    175
    Location:
    not in Past
    Figured it out myself
    thread closed
    Thanks
     
Thread Status:
Not open for further replies.