Anything wrong with the below code??
if (ereg("http://www.abc.net/.+",getenv("$HTTP_REFERER")))
I want to check if the referer is http://www.abc.net/ and with anything at the back (e.g. http://www.abc.net/baba.htm) .
Please help.
I cannot see anything wrong..
What Errors are you getting when running the pagE?
Isn't it supposed to be getenv("HTTP_REFERER") and not getenv("$HTTP_REFERER")
???
Thanks. Please tell me what is wrong with the following code??
ereg("http://www.abc.net/(.+)",$str,$url);
I want to make what is after http://www.abc.net/ as value of $url .
Please help...
If your regular expression is correct (I'm not a prince of regex myself), then you should have a array of mathes in $url.
Test it with the simple: for ($n=0;$n<count($url);$n++) { echo $url[$n] ."<br>"; }