Forum Moderators: martinibuster
I have a site whos pages look like this:
<?php
$site = "";
$site .= "<html>";
$site .= "the site";
$site .= "</html">;
print $site;
?>
So on each page you build one string and then print it at the end.
Can I integrate adsense into this site like this?:
$site .= "the adsense chunck";
Was wondering if this wouldn't work because the adsense block is javascript or something.
thanks
$html .= "
<script type=\"text/javascript\"><!--
google_ad_client = \"pub-nnnn\";
... etc ...
";
I usually make a function like google_ad($format="250x250") and depending on the value of $format serve a different ad. I think this would be a more relevant question in a PHP forum though.
Search Google on these terms:
SSI - (server side includes)
parsing .shtml
.htaccess
Advice for newbies to website building:
Just keep reading and learning about it. Coding "by hand" gives you more power and flexibility over your sites. If you are going to have a BIG site, plan ahead with a good foundation of code for each page.