Re: how do I strip out data from a url?

From: Date: Sat, 05 Apr 2003 02:10:25 +0000
Subject: Re: how do I strip out data from a url?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-142471@lists.php.net to get a copy of this message
//Beware, untested! preg_match('|.*([0-9]{10}).*|',$_SERVER['HTTP_REFERER'],$matches); $number = $matches[1]; Damon wrote:
Hi, I have a realatively easy problem that I need help on. I want to take a 10-digit number out of a referring url and put it in a variable. Eg. www.jimmy.com/mypage/xyz0123456789xyz/index.php I just need the 10-digit number from this string. Thanks! Damon
-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

« previous php.general (#142471) next »