Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_COOKIE['users_resolution'])) {
- $screen_res = $_COOKIE['users_resolution'];
- }
- ?>
- <html>
- <head>
- <title>Simple Login</title>
- <script>
- <!--
- writeCookie();
- function writeCookie()
- {
- var today = new Date();
- var the_date = new Date("December 31, 2023");
- var the_cookie_date = the_date.toGMTString();
- var the_cookie = "users_resolution="+ screen.width +"x"+ screen.height;
- var the_cookie = the_cookie + ";expires=" + the_cookie_date;
- document.cookie=the_cookie;
- }
- //-->
- </script>
- </head>
- <body>
- <!--This part of the script is a short form that prompts the user to enter their account details. the correct user and password is
- stored in the checkid page which is username: "sonny" and password: "123"-->
- <table>
- <form name="login" action="checkid.php" method="post" onSubmit="return Validate()">
- <input type="hidden" value="agentlogin" />
- Username <input name="username" type="text" id="txtUsername" maxlength="30" />
- <br />
- Password <input name="password" type="password" id="txtPassword" maxlength="8" />
- <br />
- <input type="submit" name="Submit" value="Login" />
- </form>
- </table>
- <center> <strong>
- <?php
- // These are the web statistics that display the screen resolution, web browser and number of hits.
- //Displays the resolution
- echo $screen_res;
- echo "<br />";
- //Displays the web browser
- echo $_SERVER["HTTP_USER_AGENT"];
- echo "<br />";
- /* This is the hit counter which counts each time the website is visited. It uses the fopen function and updates the file "hits.txt"
- and uses the increment operator to count every visit.*/
- $count = file_get_contents("hits.txt");
- $count++;
- $file = fopen("hits.txt", "w");
- fwrite($file, $count);
- fclose($file);
- //This prints the amount of hits the website has received.
- echo $count . " Page Hits."
- ?>
- </center></strong>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement