Im trying to figure out how to make dynamic landing pages also , but for producing leads. I came across this code at digital point:
<?php
// take the referer
$thereferer = strtolower($_SERVER['HTTP_REFERER']);
// see if it comes from google
if (strpos($thereferer,"google")) {
// delete all before q=
$a = substr($thereferer, strpos($thereferer,"q="));
// delete q=
$a = substr($a,2);
// delete all FROM the next & onwards
if (strpos($a,"&")) {
$a = substr($a, 0,strpos($a,"&"));
}
// we have the results.
$mygooglekeyword = urldecode($a);
}
?> and then use <?= $mygooglekeywords ?> where you want to output the keywords. Only works for referrer coming from google.
I cant figure out how to implement it though. I tried pasting the code into my html page and the using <?= $mygooglekeywords ?> where i wanted the keywords. But that wouldnt worh for me. Anyone know how to use this code?
Here's the link to the thread at DP:
http://forums.digitalpoint.com/showthread.php?t=107770&highlight=keyword+insertion+landing+page