A couple of very basic problems
Posted: Sat Oct 19, 2002 12:19 pm
Hi,
I am starting out and have various problems.
I have a VB Backround so please
don`t shoot me if I ask stupid/obvious questions
thanks to a nice member of this forum I received some of the following code and tried to extend it a bit. Unfortunately it just doesn`t work, the way I am trying to make it work
Your help would be very much appreciated.
Hope you can help me.
Bye
Nike
I am starting out and have various problems.
I have a VB Backround so please
don`t shoot me if I ask stupid/obvious questions
thanks to a nice member of this forum I received some of the following code and tried to extend it a bit. Unfortunately it just doesn`t work, the way I am trying to make it work
Your help would be very much appreciated.
Code: Select all
if (isset($_SERVERї'HTTP_REFERER']))
#ok this works fine
{
print 'HTTP_REFERER = ' .$_SERVERї'HTTP_REFERER'];
#get the referer into a Variable and print it out...
#this doesn´t work, why?
#get the value into the variable
$strHTTPRef = $_SERVERї'HTTP_REFERER']
# print the variable
print $strHTTPRef; //
#create a pagebreak
echo '<br>'; #this works
echo "n"; #this doesn`t
#echo ''n'''; #this doesn`t, too.
echo "This is a pagebreak \n";#why does it not create a pagebreak?
#Do I have to change a setting in my php.ini file or what am I doing wrong?
#print out the last Part of e.g. http://www.mysite.com/test.htm ->test.htm;
print substr(strrpos($_SERVERї'HTTP_REFERER'],""e;),strlen($_SERVERї'HTTP_REFERER'])-strrpos($_SERVERї'HTTP_REFERER'],""e;));
#ok, you could do this with this ereg thing,
#but I would like to chop the string into pieces, but it doens`t work,
#can anybody tell me why?
#Did I forget something?
}
else
print 'no HTTP_REFERER given';
?>Bye
Nike