Uploading a photo with Flickr - php

I just started working with the Flickr API today and I have a question:
If I allow a person to upload a photo to my website and then in order for me not to store it on my small local server, how can I just upload that photo to Flickr using the PHP Flickr API?
That should be a pretty common use case, correct? I use PHP.
Thanks,
Alex

Flickr Upload API:
http://www.flickr.com/services/api/upload.api.html
Simple php script to upload pics on flickr
http://www.flickr.com/groups/api/discuss/72157621716056865/
Maybe this will point you in the right direction since depending on what you want to do with your files after you upload them.

Have you checked out the documentation for the API. I've worked with it in the past, you don't need to download the image yourself you upload it and send it straight to Flickr.

Related

How do I upload directly to YouTube without uploading to server first?

I have tested and used Google's resumable upload code sample. Based on that, if I use HTML5's upload file API, I would have to upload the file to the server first then post the video's name to Google's resumable upload php file, right? If so, then this would mean a very long upload process because I'm uploading to two servers consecutively.
Hence, my question title. Is it possible? If so, please point me to the right direction or simple tutorials using YouTube API v3 to get started. Thank you very much!
P.s. I've heard of Zend Framework but I don't want to install the whole thing just to use a simple YouTube upload. Please guide me by extending the usage from Google's code sample.
Two possible approaches right now.
Browser based upload via YouTube API v2 (scheduled to be removed april 2015)
https://developers.google.com/youtube/2.0/developers_guide_protocol_browser_based_uploading
CORS upload with API v3.
SO Question with details

How to post images to users' wall (or in folders/albums) on Facebook (2013)

I am using Facebook's PHP SDK. I looked here (official documentation by Facebook) for help. It is not working for me because I am using images hosted externally but if I try to upload files hosted within my server then it works fine.
Is there any new way to do this. Please try to explain both (Posting to feed and to some folder/album). Sorry for this question but others here were of no help to me.
Please suggest any PHP editor that is compatible with Facebook's API. (Auto-completion etc.)
Stack is normally for solving small issues (think using = rather than > in a query) not a complete project.
Have you attempted writing this code yourself, if so what errors is it spitting out? rather than saying it doesn't work.
If the images are stored somewhere out there, you need to download them to your server and upload them to FB. You can't just tell FB an URL of an image, it's not working like this.
In order to upload fotos, you may use the "photo post" Method on the FB API. And it wants the binary data of the image. You may link an input and an output stream to that (what I would prefer using Java since no storage is needed).
Since your code is working with locally hosted images, just encapsulate that part and make the external image an internal one first.

API - To upload image and to list them

I want to upload image to a image hosting service (free). I want users to upload images using the form in my website, but directly to the my image hosting's account(in a album). I don't want users to upload images to my server first and then later upload this file to imagehosting account by using my server script.
I have read about Imageshack's API and imgur API. But i donot think they will allow direct uploading.
Do you know any image hosting service or API, that allows:
uploading images directly to the image hosting account (by users of
my website, instead of using script to do the upload)
easy to use API with PHP
allows fetching of images from the albums later
Please help
Try to use uploadify library. This is very nice and usefull lib.
http://www.uploadify.com/

Vimeo PHP Upload Directory

I have spent this best part of a week rattling my brain to get this working and I've just come to the conclusion that this is out of my scope. I know this is a rather large ask but I just can't figure it out. :(
Anyway, I am trying to upload some files in a directory on my webserver to Vimeo through a protected php script (I say protected because the script itself will not be accessible from the web) and have that script run via a cron job. The script will only upload to my account.
I have gotten as far as getting a consumer key and consumer secret from vimeo.
I have been attempting to use their documented API demo but that keeps requesting an oauth_token and oauth_token_secret, both of which I don't know how to obtain. I found it quite confusing and unsure if I could adapt it for my requirements. Instead, I googled and found this blog post about transfering files from youtube to vimeo - http://mclear.co.uk/2011/05/27/transfer-videos-from-youtube-to-vimeo/ - I thought I could use it as a building block but I've hit a dead end here also.
To explain the full scale of what I'm trying to achieve:
Video file is created on originating computer - Working
User adds ID3 tags to the file and drops it in a watched folder - Working
Local server sends the file via ftp to the webserver directory - Working
Php script reads the ID3 for the file and uploads it to vimeo - [ID3 Extractor working -Vimeo uploader not working]
Vimeo responds with upload location to script which then connects to our mysql server to add the record - Not working but straightforward to implement once uploader works
Thank you so much in advance for any help you can give.
Richard
I made some progress on this with the php "Transfer Youtube to Vimeo tool" I made
The download at the bottom of the article will get you uploading w/ PHP
The CLI tool is now available and comes with a video tutorial for how to use it.
Credit to #TomNomNom
Please don't contact me RE this I'm not supporting this code it was just hacked together :)

How to upload or share images on Flicker through php or Action script

i am developing an application in which user have the option to share images on different social sites like Facebook, twitter and Flickr.
I have done with Facebook and twitter, i upload image to my server and share the link on Facebook and Twitter.
with share link like
http://www.facebook.com/sharer.php?u=YOUR-IMAGE-PATH
this is working well.
But i don't have any idea how can i share my images on Flickr?
Please help me if anyone have done this or any idea of sharing images on Flickr through php or in action script.
You need to call Flicker UPLOAD API and need to send POST request from Flex
using FileReference for Flex see Working with file upload and download
and you may find this blog Flex and Flickr uploading helpfull
Hopes that helps

Categories