473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

please cUrl help

2
Hello
I'm trying to write some code to upload video to YahooVideo!

I'm using cUrl..
Basically I go trough the following steps:

1 call the login page
2 get challenge and user values
3 send the login form
4 get the _crumb and Sig values
5 send the upload form

the login process is fine and I get the upload page.. but after submitting the upload form i get the following message

Please correct the following information:Your file was not uploaded successfully. Please try again

I check all the values I send .. and they are correct...

Any help??

this is the code I use to submit the form:
[php]
function UploadVideo_step2(){
$this->initCurl();
//set curl options
$this->url = "http://upload.video.yahoo.com/videoAPI/v1.0/Video.upload";
$this->cookieFile = $this->cookieFileJar;
$this->referer = "http://uk.video.yahoo.com/video/upload";
$this->numPostField = "16";
$this->follow = "1";
$doneUrl = urlencode("http://uk.video.yahoo.com/video/studio?action=upload");
$errorUrl = urlencode("http://uk.video.yahoo.com/video/upload");
$this->postFields = "_errorUrl=".$errorUrl."&Author=".$this->login."&MAX_FILE_SIZE=104857600&Region=uk&Channel s=3302376&Sig=".$this->sSig."&ClientID=".$this->login."&_crumb=".$this->sCrumb."&PartnerID=yvideo&VIDEOFILE=".urlencode($ this->sVideo)."&Title=".urlencode($this->sTitle)."&Description=".urlencode($this->sDescription)."&Transcript=&Categories=".urlencod e($this->sCategory)."&Tags=".urlencode($this->sTags)."&_doneUrl=".$doneUrl;

//submit form ***********************************************
if ($this->setCurlOption())
{
if (file_exists("c:\myfile.wmv")){
//echo "<br>submit video<br>";
$this->execCurl();
echo $this->outputContent;
}else{
echo "file doesn't exist" ;
}
}
$this->closeCurl();
}[/php]

thanks

Enclose your code within the appropriate code tags!! See the Posting Guidelines - moderator
Jan 31 '08 #1
0 1164

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Chris Fortune | last post by:
# uname -a Linux stargate.mxc-online.net 2.4.20-021stab022.2.777-smp #1 SMP Wed Jul 28 17:12:37 MSD 2004 i686 i686 i386 GNU/Linux I recompiled PHP with mcrypt, openssl, and curl phpinfo():...
3
by: Hans | last post by:
Hi everybody, I am desperately trying to log into my account at godaddy.com with PHP and Curl and just cannot make it happen. Has anybody written a script for this purpose? Here is what I...
6
by: Shutdownrunner | last post by:
I want to store result of curl in a variable, which means to store a webpage in a variable in order to parse it later and get our some useful information. But unfortunately I'm not too experienced...
1
by: devranger | last post by:
Hello, I am in the process of learning PHP CURL and in doing some test examples I am having some issues with CURL that I do not fully understand. I am doing a test to use CURL to post and return...
9
by: devranger | last post by:
I am using the below CURL Function and can not figure out why it is not retruning the results from the post. Can anyone take a look and tell me what I may be doing wrong? I am just not seeing...
1
by: c1pkw | last post by:
Hi there, I’m having a real heap of trouble with PHP and cURL My aim is to use this code (or something like it) to submit 2 fields to a remote server (using GET) and receive back 6 fields...
3
by: k.rollman | last post by:
I am having a problem using cURL to create an https connection on a non-standard port (440). Using curl_setopt to set the port to 440 has no effect, and I get the following from curl's verbose...
3
by: rottmanj | last post by:
I am re-writing my rets application in perl, and I have found a few modules that will help me on my way. One of them being WWW::Curl:easy. During my testing, I have tested both system curl and...
3
by: Sarah | last post by:
I was wondering if someone might be able to help me with this issue. I have a feeling this has something to do with my host's server settings as I used to be able to get CURL to follow redirects by...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.