Change content based on url`s
Posted: Thu Feb 21, 2013 7:52 am
Hello!
I`m newbie and just started with php. Could you help me?
I want to change text based on many url.
I write code, but it filtering only one url
I want to make something like that
Hope you will help me...
I`m newbie and just started with php. Could you help me?
I want to change text based on many url.
I write code, but it filtering only one url
Code: Select all
<?php
$ref=getenv('HTTP_REFERER');
if (strpos($ref,"www.site.com/news")>0)
{
echo "News;
}
else
{
echo "";
};
?>
Code: Select all
<?php
$ref=getenv('HTTP_REFERER');
if (strpos($ref,"www.site.com/1")>0)
{
echo "1;
}
else
{
if (strpos($ref,"www.site.com/2")>0)
{
echo "2;
}
else
{
if (strpos($ref,"www.site.com/3")>0)
{
echo "3;
}
else
{
?>