Advertisement
Guest User

Untitled

a guest
Nov 29th, 2014
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. $username = "admin";
  2. $password = "1234" ;
  3. $verb = 'GET'
  4. $url = "https://xxx.xxx.xxx/api.phtml/login" ;
  5.  
  6. $params = array("username"=>$username, "password"=>$password);
  7. $params = http_build_query($params);
  8. $url .= '?' . $params;
  9.  
  10. $cparams = array( 'http' => array( 'method' => $verb,
  11. 'ignore_errors' => true ) );
  12.  
  13. $context = stream_context_create($cparams);
  14. $fp = fopen($url, 'rb', false, $context);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement