Hello,
Thank you for your message.
I just tried it again several times, even with several paramter changes, unfortunately, the same message still comes:
Debug: # 1 - Upload Server Url
Debug: upload_url =
https://fs44.gounlimited.to/upload/01
Debug: # 2 - Upload File
Debug: upload output =
HTML:
<HTML> <BODY> <Form name = 'F1' action = 'https: //gounlimited.to/' target = '_ parent' method = 'POST'> <textarea name = "op"> upload_result </ textarea> </ form> <script> document.location = 'javascript: false; document.F1.submit (); </ script> </ BODY> </ HTML>
Here is the code:
PHP:
$file_name = "upload_testfile.mp4";
$local_path = "/var/www/movie/temp/";
$file_path = $local_path.$file_name;
$upload_url = file_get_contents("
http://gounlimited.to/api/upload/server?key=xxxxx");
$upload_url = json_decode($upload_url, true);
$upload_url = $upload_url['result'];
echo "Debug: #1 - Upload Server Url\n";
echo "Debug: upload_url = ".$upload_url."\n\n";
$ch = curl_init( $upload_url );
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, array('key' => 'xxxxx', 'file' => new CURLFile( $file_path )) );
// curl_setopt($ch, CURLOPT_POSTFIELDS, array('key' => 'xxxxx', 'file1' => new CURLFile( $file_path )) );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1090.0 Safari/536.6');
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
// curl_setopt($ch, CURLOPT_TIMEOUT, 25);
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$upload = curl_exec($ch);
curl_close($ch);
// $upload = json_decode($upload, true);
// $url = $upload['result']['url'];
echo "Debug: #2 - Upload File\n";
echo "Debug: upload output= ".$upload."\n\n";
// echo "Debug: upload_json = ".$upload."\n\n";
// echo "Debug: url = ".$url."\n\n";
// print_r($upload_url);
// print_r($upload);
Btw: In your API is sometimes the variable "api_key" and then sometimes just "key", maybe you should make the time completely new.
What I noticed is your Stream Player always needs about 8-12 + seconds to a stream is loaded, that is compared to the competition already very slow. Location is Niederladen / Germany
Best regards