-2
simply <? echo "this page is referred by google.com" ?> instead using document.write(document.referrer);, think again, u know u REFER 2.php from 1.php why would u use http_referrer ?
as explained by @knoforce,
http referrer is controlled by referrer, u cannot force public user to install ...