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:You r 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_ste p2(){
$this->initCurl();
//set curl options
$this->url = "http://upload.video.ya hoo.com/videoAPI/v1.0/Video.upload";
$this->cookieFile = $this->cookieFileJa r;
$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=u pload");
$errorUrl = urlencode("http ://uk.video.yahoo. com/video/upload");
$this->postFields = "_errorUrl=".$e rrorUrl."&Autho r=".$this->login."&MAX_FI LE_SIZE=1048576 00&Region=uk&Ch annels=3302376& Sig=".$this->sSig."&ClientI D=".$this->login."&_crumb =".$this->sCrumb."&Partn erID=yvideo&VID EOFILE=".urlenc ode($this->sVideo)."&Titl e=".urlencode($ this->sTitle)."&Desc ription=".urlen code($this->sDescription). "&Transcript=&C ategories=".url encode($this->sCategory)."&T ags=".urlencode ($this->sTags)."&_done Url=".$doneUrl;
//submit form *************** *************** *************** **
if ($this->setCurlOption( ))
{
if (file_exists("c :\myfile.wmv")) {
//echo "<br>submit video<br>";
$this->execCurl();
echo $this->outputConten t;
}else{
echo "file doesn't exist" ;
}
}
$this->closeCurl();
}[/php]
thanks
Enclose your code within the appropriate code tags!! See the Posting Guidelines - moderator
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:You r 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_ste p2(){
$this->initCurl();
//set curl options
$this->url = "http://upload.video.ya hoo.com/videoAPI/v1.0/Video.upload";
$this->cookieFile = $this->cookieFileJa r;
$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=u pload");
$errorUrl = urlencode("http ://uk.video.yahoo. com/video/upload");
$this->postFields = "_errorUrl=".$e rrorUrl."&Autho r=".$this->login."&MAX_FI LE_SIZE=1048576 00&Region=uk&Ch annels=3302376& Sig=".$this->sSig."&ClientI D=".$this->login."&_crumb =".$this->sCrumb."&Partn erID=yvideo&VID EOFILE=".urlenc ode($this->sVideo)."&Titl e=".urlencode($ this->sTitle)."&Desc ription=".urlen code($this->sDescription). "&Transcript=&C ategories=".url encode($this->sCategory)."&T ags=".urlencode ($this->sTags)."&_done Url=".$doneUrl;
//submit form *************** *************** *************** **
if ($this->setCurlOption( ))
{
if (file_exists("c :\myfile.wmv")) {
//echo "<br>submit video<br>";
$this->execCurl();
echo $this->outputConten t;
}else{
echo "file doesn't exist" ;
}
}
$this->closeCurl();
}[/php]
thanks
Enclose your code within the appropriate code tags!! See the Posting Guidelines - moderator