@ Sun ...
... ok, my fault ... I suggested it because I thought it was your index.php ... sorry ...
... why you use a java script for inserting ...
... and why you don't use the following in your html-file (if both files are on the same server) ...
<?php
include("./random.php");
?>