Thomisback Posted December 8, 2008 Share Posted December 8, 2008 Hi, I'm trying to post some variables and upload a picture with CURL, I have been searching for hours and i'm really stuck. Part of my code: $parameters = array("file" => "@test.jpg", "othervars" => "true"); etc...etc... curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters); The error I get is: failed creating formpost data It is this bit which causes the error: "file" => "@test.jpg" While the image is in the same folder! Does anyone see what's wrong with my script? Thanks a lot Quote Link to comment Share on other sites More sharing options...
Thomisback Posted December 9, 2008 Author Share Posted December 9, 2008 Anyone? Quote Link to comment Share on other sites More sharing options...
Thomisback Posted December 9, 2008 Author Share Posted December 9, 2008 Got it, the path of the picture was wrong... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.