can any body tell me what is issue in putlocker API ?

Discussion in 'PHP' started by ironmankho, Jul 19, 2013.

  1. #1
    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
     
    Solved! View solution.
    ironmankho, Jul 19, 2013 IP
  2. malky66

    malky66 Acclaimed Member

    Messages:
    3,997
    Likes Received:
    2,248
    Best Answers:
    88
    Trophy Points:
    515
    #2
    malky66, Jul 19, 2013 IP
    ryan_uk likes this.
  3. ironmankho

    ironmankho Active Member

    Messages:
    393
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #3
    ok this is good
    $local_file = "filename.avi";(what you write for this ) it is testing in windows OR linux
     
    ironmankho, Jul 21, 2013 IP
  4. #4

    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):
     
    malky66, Jul 22, 2013 IP
    ryan_uk likes this.
  5. t3od0r

    t3od0r Well-Known Member

    Messages:
    334
    Likes Received:
    3
    Best Answers:
    3
    Trophy Points:
    155
    #5
    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.
     
    t3od0r, Jul 26, 2013 IP