Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $username = "admin";
- $password = "1234" ;
- $verb = 'GET'
- $url = "https://xxx.xxx.xxx/api.phtml/login" ;
- $params = array("username"=>$username, "password"=>$password);
- $params = http_build_query($params);
- $url .= '?' . $params;
- $cparams = array( 'http' => array( 'method' => $verb,
- 'ignore_errors' => true ) );
- $context = stream_context_create($cparams);
- $fp = fopen($url, 'rb', false, $context);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement