upload to Flickr

Hi everyone,
first time here, I’m actually an Actionscript developer, so not very in to php coding (just what I need to interact with SQL, etc…). I’m trying to make a CMS that will update the photogallery on website (working perfectly), but I also wanna upload the pic to Flickr account.
I’m using this code (can’t post the link)
http://code.google.com/p/flickr-php-curl-multiple-upload/source/browse/trunk/curl.php?spec=svn2&r=2
It works fine and stuff, but I need to make a little trick. The client currently has Windows server and they’ll move to Linux next year. Since I needed Linux (curl) I converted my own web server. So the trick now would be to upload the photo from the client’s web server. I of course get an error when inserting the image url path with the client’s domain.
could it be done, somehow or should I upload the photo to my own web server too and then delete it? I’m going to do this for many clients, so I need a stable solution.

Thanks!!!

Update: I tried to upload to my web server and it works fine, but only if I manually insert the pic path, title and description. I of course need variables, put these on top of the page getting vars from Flash

[php]$thepic = $_POST[“picIn”];
$thetitle = $_POST[“titleIn”];
$thedescription = $_POST[“descriptionIn”];
$thetags = $_POST[“tagsIn”];[/php]

but this code doesn’t seem to “accept” variables (I think… only thing I know, it doesn’t work anymore…).

Is top of the page the wrong place? should I include a php with this code into the other one or vice versa?

I’ll go on testing tonite, but I really could use a little help!!!

Thanks!!!

I don’t know anything about flash, but I am under the impression that the $_POST array will only be populated if you had an html form on the previous page, and then have it’s “action” attribute direct you to the php document you showed us. Also, if you want to upload documents, I believe the document will go into the $_FILES array by default, where it’s $_FILES[‘name_you_specified_in_html’][‘other’] and where ‘other’ is “tmp_name”, “name” or “error” among a few other things.

The syntax itself of the PHP you posted looks fine to me. You may need to share more code. Perhaps the page that leads here…

Thank you for the reply AnotherWannabe!

I traced the returned code as I was wishing to get my variables echo and guess what…? I’m not logging in. I get returned the login page code.

As I don’t actually understand the php, does it redirects to it somewhere or it’s Flickr acting like that? there’s actually an AS3 library, but I can’t find any useful example… :frowning:

If I call the page by url in the browser is fine, even with variables, but if I call it by Flash, doesn’t… so I guess I either have to find a way to declare the auth, the secret and the toke better or… I have no idea… :’(

Unfortunately I didn’t understand most of your last reply.

Are you including a connect file to make sure your login information and session variables are being carried to your page? Something like this at the top of the page?

include ‘connect.php’;

Regardless, please rephrase your last post.

OMG, the reply notification email was in the spam folder, didn’t notice it!!!

ok, well, the problem is I’m not getting the variables. I’m sure about it.

if I remove
[php]$fk->auth(“write”,TRUE);[/php]
i do get them, if it is there, I lose the variables. The code is exactly the same as the one hosted by google code.

either method #3 or #4, I lose them.

What about _SESSION variables? I tried, but I’m not sure I did it right. is it there any good example?

Thanks!!

Sponsor our Newsletter | Privacy Policy | Terms of Service