note 40753 deleted from function.parse-str by nlopess
| From: | nlopess@php.net | Date: | Sat, 13 Mar 2004 21:32:11 +0000 |
| Subject: | note 40753 deleted from function.parse-str by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66782@lists.php.net to get a copy of this message | ||
Note Submitter: nomix25@hotmail.com
----
I posted one sample code but you people changes parameter of email from em=email@email.com to
email=email@email.com
I am substracting upto 3 positons what was correct in case of em= (3 chars) but not in this case.
So change the line from
$str = substr($str,3);
to
$str = substr($str,6);
because the length of "email=" has 6 chars.
Thanks.
$str = "nvmcnv http://www.domainname.com?email=email@email.com
gfkglfk gfgf";
getparmvalue($str);
function getparmvalue($str)
{
$str = trim($str);
$str = parse_url($str);
$str = $str["query"];
$str = substr($str,3);
$str = substr($str,0,strlen($str));
$str = explode(" ",$str);
return $str[0];
}