fork download
  1. <?php
  2. $url = 'https://t...content-available-to-author-only...e.services/aci-ocean/unified/submit';
  3. $user="";
  4. $password="";
  5. // Create & initialize a curl session
  6. $curl = curl_init();
  7.  
  8. // Set our session options
  9. curl_setopt($curl, CURLOPT_URL, $url);
  10. // curl_setopt($curl, CURLOPT_HTTPHEADER, array( 'Authorization: Basic ' . base64_encode($user . ':' . $password) ));
  11. curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
  12.  
  13. curl_setopt($curl, CURLOPT_POST, true);
  14. $datas = array( "username" => $user, "password" => $password);
  15. curl_setopt($curl, CURLOPT_POSTFIELDS, $datas);
  16.  
  17. curl_setopt($curl, CURLOPT_HTTPHEADER, array(
  18. "Cache-Control: no-cache",
  19. "content-type:application/json;charset=utf-8"
  20. ));
  21.  
  22. curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_NONE);
  23.  
  24. // Execute the curl session and store it in a variable
  25. $result = curl_exec($curl);
  26. print ( $result );
  27. ?>
  28.  
Success #stdin #stdout 0.03s 26572KB
stdin
Standard input is empty
stdout
Standard output is empty