I looking for expert of php who wants to help me in this strange problem. This script added bellow sometimes works good. I have three domains pointed to one directory. Google maps requires api key unique for each domain. My script have to change the key value online. I see that page from IE8 always are showed correctly but from Chrom and Firefox this script has problem but not always. Ofcourse I controled source of page and there was empty where should be script src. Thank you Have a nice day!
There is full code added in HEAD of page.
<?php
if ($_SERVER['HTTP_HOST']=='napuzaka.pl')
{echo "<script src='http://maps.google.com/maps?file=api&v=2&key=http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAYTZHyOQ5V62SeMKaQnfsmBTpouANZ5f-taQv7LHvODzA4dkDHBSIDoDMuDCbfgg0tAyoHhFajBNCJQ' type='text/javascript'></script>"; }
if ($_SERVER['HTTP_HOST']=='xn--napuaka-zwb.pl')
{echo "<script src='http://maps.google.com/maps?file=api&v=2&key=http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAYTZHyOQ5V62SeMKaQnfsmBSz8IVGRhEo79udyNR7B2dzTza61xRpT9lPIg18vhQmddrMIlSVereK3g' type='text/javascript'></script>";}
if ($_SERVER['HTTP_HOST']=='xn--przychodnia-na-puaka-yle.pl')
{echo "<script src='http://maps.google.com/maps?file=api&v=2&key=http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAYTZHyOQ5V62SeMKaQnfsmBTIBRlPbe0ldXIT_VQB31noUDT8mRReXxc12wAWIs4fuEXiTbsZ0HvViA' type='text/javascript'></script>";}
?>