Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $id="";
- $password="");
- $data="username=$id&password=$password&buttonClicked=4";
- $request="POST /login.html HTTP/1.1\r\n";
- $request.="Host: wifi.mmu.edu.my\r\n";
- $request.="Content-type: application/x-www-form-urlencoded\r\n";
- $request.="Content-length: ".strlen($data)."\r\n";
- $request.="Connection: Close\r\n\r\n";
- @$sock=fsockopen("ssl://wifi.mmu.edu.my",443);
- if(!$sock) {die("Error: Unable to connect!");}
- fwrite($sock,$request.$data);
- while(!feof($sock)) {
- $content.=fgetc($sock);
- }
- //echo $content;
- if (strpos($content,"Login Successful")!==false) {echo "Login Successful!";}
- elseif (strpos($content,"You are already logged in.")!==false) {echo "You are already logged in!";}
- elseif (strpos($content,"The User Name and Password combination you have entered is invalid.")!==false) {echo "Incorrect Username/Password!";}
- ?>
Add Comment
Please, Sign In to add comment