fork download
  1. <?php
  2.  
  3. $url = 'http://e...content-available-to-author-only...e.com?param=test1\test2\test3\test4';
  4. $cleanUrl = preg_replace('|[^-\\\\a-z0-9~+_.?\[\]^#=!&;,/:%@$\|*`\'<>"()\x80-\xff{}]|i', '', $url);
  5. echo $cleanUrl;
Success #stdin #stdout 0.01s 52488KB
stdin
Standard input is empty
stdout
http://e...content-available-to-author-only...e.com?param=test1\test2\test3\test4