| 
Communications∨
 | 
Infos on Art∨
 
Kallery > _others > 
Yi Taiyub
 (trustle)
Profile | Works | Posts
434
[Tip] Regular Expression $_SERVER['REQUEST_URI']
Yi Taiyub at 2017-12-17 08:33
URL http://kallery.net/s.php?i=840

URI RFC3986 (2005)
reserved    = gen-delims / sub-delims
gen-delims  = ":" / "/" / "?" / "#" / "[" / "]" / "@"
sub-delims  = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" 
unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"

              :/?#[]@
   urlencode: %3A%2F%3F%23%5B%5D%40
rawurlencode: %3A%2F%3F%23%5B%5D%40

              !$&'()*+,;=
   urlencode: %21%24%26%27%28%29%2A%2B%2C%3B%3D
rawurlencode: %21%24%26%27%28%29%2A%2B%2C%3B%3D

              -._~
   urlencode: -._%7E
rawurlencode: -._%7E

$strng = "-._ azAZ09";
<a href="addrss?strng=<?php echo rawurlencode($strng); ?>">anchor</a>

preg_match('/(?:\?|&)strng=([-._%a-zA-Z0-9]+)/',$_SERVER['REQUEST_URI'],$arry);
echo rawurldecode($arry[1]);


[Permission] Read:Anonymous, Comments:Member, Post:Yi Taiyub, File Upload:Yi Taiyub, Management:Yi Taiyub



Introduction | Google+