I have used the php below to show a different telephone number in the header of the site depending upon where the visitor comes from. The code below works but looses the original referrer information upon click of own site links, defaulting the telephone number back to the generic number.
Is there away to save it to the session, maybe the start session and save session is not done correct?
Thanks for any help
................................................. ............................
<?PHP
session_start();
if(!isset($_SESSION[’referrer’])){
$referer = strtolower($_SERVER["HTTP_REFERER"]);
if (strstr($referer,"site1"))
{
echo("<h1>Telephone Number1</h1>");
}
else if (strstr($referer,"site2"))
{
echo("<h1>Telephone Number2</h1>");
}
else if (strstr($referer,"site3"))
{
echo("<h1>Telephone Number3</h1>");
}
else if (strstr($referer,"site4"))
{
echo("<h1>Telephone Number4</h1>");
}
else
{
echo("<h1>Telephone Number5</h1>");
} $_SESSION[’referrer’] = $referrer; // store session data
}?>
how to timeout $doc = new DOMDocument()->load($url)
I am currently using this $doc->load($url) to fetch an rss feed.If a feed takes long than 20 seconds to download, I wish to terminate it and proceed to the next, is there any way of terminating
Simpler method of getting variables from mysql
Hi Guys,I'm trying to streamline my CMS's code and as I was writing a new page it occured to me that there might be an easier way to get variables from a mysql query and that if anyone knew how to do
How do i do multi uploads?.
Hey i would like to do this : http://hosting.mrkrabz.net/I've got the base down you can upload single files, But how would i make it so when you click a button it adds a new field for a file to be
http to https
Hi,Is there any specific method/condition to move an http:// page to https:// ?
CHMOD script
Hi,I need a script to read all files in a folder and set to 777.Can anyone help out please?
FlashVar function how to insert variables
Hi guys. Im new in this forum and also new in php programming. Can you help me about this code?<embed src='player-viral.swf' width='263' height='220' bgcolor='undefined'
form problem
Hi all, I think this is going to be easy to resolve but for I have been looking at it to long and I cannot see my issue!I hope this is in the right section as it uses modalbox, however I think its a
Credit card verification
I have a client who wants to process credit card transactions from his web site rather than the going through something like paypal. I've never done that before...what is my first step? I really dont
Table trouble
i have been reading the forum for a few weeks and decided to join. i like the format and the advice given is great. anywho here is my table, the issue i have is that i am displaying pictures from
returning data from an ssh2_exec()
here's what i got.$conn = ssh2_connect($this->_host); ssh2_auth_password($conn,$this->_user,$this->_pass)or die("Cannot Connect"); //build command line to include