You can make a code in PHP, which when uploading the images, host them on the blogger server

0

I have a php code that uploads multiple images at the same time and hosts it on my own server, but I'd like to make the server lighter by hosting the images on free servers like blogger. Is there any way to do this?

    
asked by anonymous 23.11.2014 / 20:33

1 answer

1

You can use the Flickr API for this:

link

API Link for Uploading Images:

link

Upload

URL used to upload images / photos:

  

link

Authentication

This method requires authentication with 'write' permission.

Parameters (arguments)

  • photo     The file to upload.
  • title (optional)     The title of the photo.
  • description (optional)     A description of the photo. It may contain some limited HTML.
  • tags (optional)     A list of tags separated by spaces to apply to the photo. is_public, is_friend, is_family (optional)     Set to 0 for no and 1 for yes. Specifies who can view the photo.
  • safety_level (optional)     Set 1 for Safe, 2 for Moderate, or 3 for Restricted.
  • content_type (optional)     Set 1 for Photo, 2 for Screen Shot, or 3 for Other
  • hidden (optional)     Set 1 to show photos in all search results, 2 not to show in public searches.
  • Response

    <photoid>1234</photoid>
    

    Possible errors

    • 2: No photo specified    The photo required argument was missing.
    • 3: General upload failure    The file was not correctly uploaded.
    • 4: Filesize was zero    The file was zero bytes in length.
    • 5: Filetype was not recognized    The file was not a recognized image format.
    • 6: User exceeded upload limit    The calling user has reached their monthly bandwidth limit.
    • 95: SSL is required    SSL is required to access the Flickr API.
    • 96: Invalid signature    The passed signature was invalid.
    • 97: Missing signature    The call required signature but no signature was sent.
    • 98: Login failed / Invalid auth token    The login details or auth token passed were invalid.
    • 99: User not logged in / Insufficient permissions    The method requires user authentication but the user was not logged in, or the authenticated method call did not have the required permissions.
    • 100: Invalid API Key    The API key passed was not valid or has expired.
    • 105: Service currently unavailable    The requested service is temporarily unavailable.
    • 106: Write operation failed    The requested operation failed due to a temporary issue.
    • 116: Bad URL found    One or more arguments contained within a URL that has been used for abuse on Flickr.

    Alternatives

    ImageShack: link (API: link )

    Picasa Web Albums Data API: link

        
    20.10.2015 / 00:26