Advertisement
Guest User

Untitled

a guest
Jun 13th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. <?PHP
  2.  
  3. $username = "mediagoeshere_iso";
  4. $password = "6tqOhXkfVWqY50VLCQATm2";
  5. $remote_url = 'https://23.100.76.237:9657/api/feeds/InventoryFeed';
  6. // Create a stream
  7. $opts = array(
  8.   'http'=>array(
  9.     'method'=>"GET",
  10.     'header' => "Authorization: Basic " . base64_encode("$username:$password")                
  11.   ),
  12.         "ssl"=>array(
  13.         "verify_peer"=>false,
  14.         "verify_peer_name"=>false,
  15.     ),
  16. );
  17.  
  18. $context = stream_context_create($opts);
  19.  
  20.  
  21. // Open the file using the HTTP headers set above
  22. $file = file_get_contents($remote_url, false, $context);
  23.  
  24. print($file);
  25.  
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement