Hi every one I am trying to upload file via putlocker API code are given in site (http://www.putlocker.com/apidocs.php) // Variables to Post $local_file = "filename.avi"; $file_to_upload = array( 'file'=>'@'.$local_file, 'convert'=>'1', 'user'=>'dpuser', 'password'=>'123456789', 'folder'=>'FOLDER_NAME' ); // Do Curl Request $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,'http://upload.putlocker.com/uploadapi.php'); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS, $file_to_upload); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result=curl_exec ($ch); curl_close ($ch); // Do Stuff with Results echo $result; Code (markup): Account information is real if somebody is interest to check it ...... when i try i get only blank page instantly i already enable error log but i get nothing Regards
ok this is good $local_file = "filename.avi";(what you write for this ) it is testing in windows OR linux
I pasted the api code into a file called it putlocker.api, uploaded it to my server (linux) uploaded a file called "neener.gif" named the $local_file variable as "neener.gif" and called the file in my browser, it worked fine. Just make sure you name the $local_file variable to the name of the file you want to upload to putlocker and make sure the file exists on the server. // Variables to Post $local_file = "neener.gif"; $file_to_upload = array( 'file'=>'@'.$local_file, 'convert'=>'1', 'user'=>'dpuser', 'password'=>'123456789', 'folder'=>'FOLDER_NAME' ); // Do Curl Request $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,'http://upload.putlocker.com/uploadapi.php'); curl_setopt($ch, CURLOPT_POST,1); curl_setopt($ch, CURLOPT_POSTFIELDS, $file_to_upload); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $result=curl_exec ($ch); curl_close ($ch); // Do Stuff with Results echo $result; Code (markup):
There is an issue on their end. Sometimes a blank page is returned, maybe there is high server load. I tried to contact them but no answer until now.