To-Slalom

jquery

Mar 4th, 2019
144
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $ua = $_SERVER['HTTP_USER_AGENT'] ;
  3. ?>
  4. <!doctype html>
  5. <html>
  6. <head>
  7. <title>User Agent analizer</title>
  8. <link rel="stylesheet" href="bootstrap.min.css"> <!-- load bootstrap via CDN -->
  9. </head>
  10. <body>
  11. <style type="text/css">
  12. .imputua {
  13.  
  14. width:100%;
  15. }
  16. </style>
  17. <div class="col-sm-6 col-sm-offset-3">
  18.  
  19. <h1>User Agent analizer</h1>
  20. <div>Fill out and submit the form below to get response.</div>
  21. <div> <b> Your User Agent is : </b><br> <?php echo $ua ; ?></div>
  22.  
  23. <!-- our form -->
  24. <form id='userForm'>
  25. <div id="name-group" class="form-group">
  26. <label for="name">User Agent</label><br>
  27. <input type="text" class="form-control" name="name" placeholder="copy past your User Agent to analize">
  28. <!-- errors will go here -->
  29. </div>
  30. <!--
  31. <div><input type='text' name='firstname' placeholder='Firstname' /></div>
  32. <div><input type='text' name='lastname' placeholder='Lastname' /></div>
  33. <div><input type='text' name='email' placeholder='Email' /></div>
  34. <div>
  35. <input type='submit' value='Submit' />
  36. </div>
  37. -->
  38. <button type="submit" class="btn btn-success">Analyze <span class="fa fa-arrow-right"></span></button>
  39. </form><br>
  40. <!-- where the response will be displayed -->
  41. <div id='response'></div>
  42. </div>
  43. <!--
  44. <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js "></script>
  45. -->
  46. <script src="jquery.min.js "></script>
  47. <script>
  48. $(document).ready(function(){
  49. $('#userForm').submit(function(){
  50. // show that something is loading
  51. $('#response').html("<b>Loading response...</b>");
  52. /*
  53. * 'post_receiver.php' - where you will pass the form data
  54. * $(this).serialize() - to easily read form data
  55. * function(data){... - data contains the response from post_receiver.php
  56. */
  57. $.post('post_receiver.php', $(this).serialize(), function(data){
  58. console.log ( data.trim() ) ;
  59. $('#response').html(data);
  60. }).fail(function() {
  61. // just in case posting your form failed
  62. alert( "Posting failed." );
  63. });
  64. // to prevent refreshing the whole page page
  65. return false;
  66. });
  67. });
  68. </script>
  69. </body>
  70. </html>
  71.  
  72.  
  73. <pre><pre> UA : string(0) ""
  74. </pre><pre> isMobile : bool(false)
  75. </pre><pre> GetOS : bool(false)
  76. </pre><pre> Browser name : bool(false)
  77. </pre><pre> Browser type : bool(false)
  78. </pre><pre> UAVersion : bool(false)
  79. </pre><pre> engine_name : bool(false)
  80. </pre><pre> engine_version : bool(false)
  81. </pre><pre> hardware_architecture : bool(false)
  82. </pre><pre> browser_architecture : bool(false)
  83. </pre><pre> preg line : int(541)
  84. </pre></pre>
RAW Paste Data