INCLUDING JAVASCRIPT/HTML IN PHP
Posted: Mon Apr 28, 2008 10:22 pm
This is my short index.php site. It's a URL rotator.
It is http://www.mysite.com/index.php
urlrotator.txt contains: (http://www.mysite.com/page1.html and http://www.mysite.com/page2.html )
I want to add google analytics to http://www.mysite.com/index.php
I'm supposed to add the <script... JAVASCRIPT </script>... immediately before the </body> tag. That's what google analytics tells me. Where would I add that and how? is it possible?
Thanks!!
It is http://www.mysite.com/index.php
Code: Select all
<?php
$version = "v1.01";
$linksfile ="urlrotator.txt";
$urls = file("$linksfile");
$url = rand(0, sizeof($urls)-1);
$goto = "$urls[$url]";
header("Location: $goto");
?>urlrotator.txt contains: (http://www.mysite.com/page1.html and http://www.mysite.com/page2.html )
I want to add google analytics to http://www.mysite.com/index.php
I'm supposed to add the <script... JAVASCRIPT </script>... immediately before the </body> tag. That's what google analytics tells me. Where would I add that and how? is it possible?
Thanks!!