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
{
?>