note 17648 deleted from function.parse-url by jimw

From: Date: Fri, 21 Dec 2001 00:40:58 +0000
Subject: note 17648 deleted from function.parse-url by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23670@lists.php.net to get a copy of this message
The is_url function posted by pv@gnw.de on 08-Aug-2000 03:19 does not have all tokens in path and query. I have changed them, and they are below. Take the original function above and to the following changes: if ( !@eregi( "^[0-9a-z/_\.@~]*$", $parts['path'] ==== CHANGE TO ==== if ( !@eregi( "^[0-9a-z/_\.@~-]*$", $parts['path'] if ( !eregi( "^[0-9a-z?&=#\,]*$", $parts[query] ==== CHANGE TO ==== if ( !@eregi( "^([0-9a-z?&=#\,\.]|[\_])*$", $parts['query'] Hope this helps. Regards.

« previous php.notes (#23670) next »