Guest User

Untitled

a guest
Jul 18th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. function doclick(){
  2. var vid = document.getElementById("myAudio");
  3. vid.play();
  4. var http_request = false;
  5. if (window.XMLHttpRequest) { // Mozilla, Safari, ...
  6. http_request = new XMLHttpRequest();
  7. if (http_request.overrideMimeType) {
  8. http_request.overrideMimeType('text/xml');}
  9. }
  10. else if (window.ActiveXObject) { // IE
  11. try {http_request = new ActiveXObject("Msxml2.XMLHTTP");}
  12. catch (e) {
  13. try {http_request = new ActiveXObject("Microsoft.XMLHTTP");}
  14. catch (e) {}
  15. }
  16. }
  17. if (!http_request) {return false;}
  18. http_request.open('GET','/ClicksCounterVlad_File.php?go=yes', true);
  19. http_request.send();
  20. }
  21.  
  22. function pauseVid(){
  23. var vid = document.getElementById("myAudio");
  24. vid.pause();
  25. }
  26.  
  27. http_request.open('GET','/ClicksCounterVlad_File.php?go=yes', true);
  28. http_request.send();
  29.  
  30. <?php
  31. if ($_GET['go']=='yes'){
  32. $file = fopen('clicks.txt','a+');
  33. $put = file_put_contents('ClicksCounterVlad_File_numbers.txt',((int) file_get_contents('ClicksCounterVlad_File_numbers.txt')) + 1);
  34. }
  35. ?>
Add Comment
Please, Sign In to add comment