Load javascript with random query param

For now, I am just getting this logged somewhere I can find it later:

Code:
<script>
  var el = document.createElement( “script” );
  el.setAttribute( “type”, “text/javascript” );
  el.setAttribute( “src”, “time.php?rand=”+bigRandomString);
  document.getElementsByTagName( “head” )[ 0 ].appendChild( el );

  function receiveTime(minLeft)
  {
     // Do whatever
  }
</script>

time.php:

<?php

$minleft = “whatever”;
print “receiveTime($minleft);”
exit;

?>

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy this password:

* Type or paste password here:

16,278 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam Protection by WP-SpamFree