Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. $url_v = "http://example.com";
  2. if (isset($_GET['url'])){ $url_v = $_GET['url']; }
  3. $url_v = trim($url_v, "'\\");
  4.  
  5. // remove strings with 5 letters where
  6. // a lowercase letter is followed by an upper case
  7. $n_replacements = 0;
  8. $l='[a-z]'; $u='[A-Z]'; $a='[a-zA-Z]';
  9. $patt = "/\/" . $l . $u . $a . $a . $a . "\//";
  10. $url_v = preg_replace($patt, "/", $url_v, -1, $count);
  11. $n_replacements += $count;
  12. $patt = "/\/" . $a . $l . $u . $a . $a . "\//";
  13. ...
  14. ...
  15. <script type="text/javascript">location.href = '<? echo $url_v; ?>';</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement