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

Asked

Viewed 67 times

0

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

1 answer

1


You can use the Flickr API for this:

https://www.flickr.com/services/developer

Image Upload API link:

https://www.flickr.com/services/api/upload.api.html

Upload

URL used for uploading images/photos:

https://up.flickr.com/services/upload/

Authentication

This method requires write-enabled authentication (save).

Parameters (arguments)

  1. photo The file to upload.
  2. title (optional) The title of the photo.
  3. Description (optional) A description of the photo. It may contain some limited HTML.
  4. tags (optional) A space-separated list of tags 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.
  5. safety_level (optional) Set 1 to Safe, 2 to Moderate, or 3 to Restricted.
  6. content_type (optional) Set 1 to Photo, 2 to Screenshot, or 3 to Other
  7. Hidden (optional) Set 1 to show photos in all search results, 2 to not show in public searches.

Answer

<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 recognised The file was not of a recognised 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 Signing 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 a URL that has been used for abuse on Flickr.

Alternatives

Imageshack: https://imageshack.us/ (API: http://api.imageshack.us/)

Picasa Web Albums Data API: https://developers.google.com/picasa-web/docs/2.0/developers_guide_protocol

Browser other questions tagged

You are not signed in. Login or sign up in order to post.