Same as DEMO 6, just is based on PHP file. To use this example, see code below.
<?php
$script_name=(isset($_SERVER["SCRIPT_NAME"])?$_SERVER["SCRIPT_NAME"]:$HTTP_SERVER_VARS['SCRIPT_NAME']);
$js_url="jsrate.php?file=".$script_name;
?>
<script type="text/javascript" language="javascript" src="<?php print $js_url;?>"></script>