note 17648 added to function.parse-url

From: Date: Tue, 18 Dec 2001 13:09:12 +0000
Subject: note 17648 added to function.parse-url
Groups: php.notes 
Request: Send a blank email to php-notes+get-23124@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. -- http://www.php.net/manual/en/function.parse-url.php http://master.php.net/manage/user-notes.php?action=edit+17648 http://master.php.net/manage/user-notes.php?action=delete+17648 http://master.php.net/manage/user-notes.php?action=reject+17648

« previous php.notes (#23124) next »