I saw this question asked in another thread so I went looking for the answer because I thought it could be useful. I still haven't got it working right, but it's 7am in Texas and I haven't slept left and have a lot more shit to do before I can sleep.....so I'll just get to it later.
Here's what I found, I'm sure yall can improve on this:
function gup( name )
{
//Enter target urls, followed by what you want displayed
var targets=new Array(
"saab.com","Saab",
"volvo.com","Volvo",
"bmw.com","BMW",
"ferrari.com", "Ferrari"
);
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
var len=targets.length;
for (i=0; i<len; i++)
{
if (results[1]==targets[i])
return targets[i+1];
else i++;
}
return results[1];
}
<script language="JavaScript">document.write(gup( 'target' )) ;</script>
Holy cow, so much code for this? Glad I am using cpvlab and only need this code:
<?php echo($_GET["target"]) ?>
Ya then you would just get the keyword, correct. So it would be "welcome site.com visitor!" This should allow you to change it to "Welcome site visitor!" ...or whatever other variation. Like I said, I'm not implementing until tomorrow, but that's how I understand it.