List Info

Thread: note 77469 added to function.parse-str




note 77469 added to function.parse-str
user name
2007-08-30 14:51:39
I saw some posts with people wondering
 why &'s are being
 sent to this function.  Well, basically
 because thats what comes
 from a QUERY_STRING. Anyway. The bug i found is
 that the first part of a query_string
 may not contain an &. Usually the
 first parameter comes directly after the ?. 
So you
 might have to manually pre-pend an & to your
 query_string if one does not exist. 

<?php
$base="www.yahoo.com/search.aspx?";
$parsedurl=parse_url($base."&".rawurldecode($_
SERVER
['QUERY_STRING']), PHP_URL_QUERY);
parse_str($parsedurl,$myquery);
$qbn = "n=".urlencode($myquery['n']);
?>

oh my god! to get this to post is ridiculous.
----
Server IP: 64.71.164.2
Probable Submitter: 67.80.103.30
----
Manual Page -- h
ttp://www.php.net/manual/en/function.parse-str.php
Edit        -- https://master
.php.net/note/edit/77469
Del: integrated  -- h
ttps://master.php.net/note/delete/77469/integrated
Del: useless     -- http
s://master.php.net/note/delete/77469/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/77469/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/77469/spam
Del: non-english -- 
https://master.php.net/note/delete/77469/non-english
Del: in docs     -- http
s://master.php.net/note/delete/77469/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/77469
Reject      -- https://mast
er.php.net/note/reject/77469
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )