This may be helpful:
http://www.php-scripts.com/php_diary/122799.php3
<?
srand(time());
$random = (rand()%9);
print("random number between 0 and 9 is: $random");
?>
After I download the page, I use PHP's addslashes method to every line, and then I just wrap every line in a document.write. Here is the script (script.php):
$url = $_GET["url"];
$file = file("$url");
for($i = 0; $i < count($file); $i++)
{
$line = $file[$i];
$line = substr($line, 0...
I'm using php to generate a javascript script... (very ugly).
In fact, this quest
I've downloaded the html source of a webpage with php, and now I would like to display that page using javascript.
I've wrapped each line in a document.write(), but I'm having difficulty with quotation marks...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.