ID: 20308
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: SunOS
PHP Version: 4.2.2
New Comment:
After much back-and-forth on php-dev it was decided to leave
parse_url() as is.
To achieve the functionality you're looking for try something like the
following:
$addr =
parse_url('mailto:[EMAIL PROTECTED]?Subject=Here+is+an+email');
list($email,$params) = explode("?",$addr,2);
list($user,$host) = explode("@",$email,2);
// $user == "testuser";
// $host == "example.com";
// $params = "Subject=Here+is+an+email";
Previous Comments:
------------------------------------------------------------------------
[2002-11-08 04:45:34] [EMAIL PROTECTED]
PHP does not parse out those parts of the mailto url;
re-opening as a feature request.
------------------------------------------------------------------------
[2002-11-08 03:59:26] [EMAIL PROTECTED]
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2002-11-08 03:56:29] [EMAIL PROTECTED]
parse_url('mailto:[EMAIL PROTECTED]')
yields:
array( ['scheme'] => 'mailto'
['path'] => '[EMAIL PROTECTED]'
)
According
to <http://www.zvon.org/tmRFC/RFC2368/Output/chapter2.html>
and <http://www.zvon.org/tmRFC/RFC2822/Output/chapter3.html#sub4>,
it should rather yield:
array( ['scheme'] => 'mailto'
['host'] => 'uni-konstanz.de'
['user'] => 'Otto.Stolz'
)
A test page can be found at
<http://www.rz.uni-konstanz.de/Antivirus/tests/parse_url.php>,
the pertinent PHP source at
<http://www.rz.uni-konstanz.de/Antivirus/tests/parse_url.txt>.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=20308&edit=1