Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $url_v = "http://example.com";
- if (isset($_GET['url'])){ $url_v = $_GET['url']; }
- $url_v = trim($url_v, "'\\");
- // remove strings with 5 letters where
- // a lowercase letter is followed by an upper case
- $n_replacements = 0;
- $l='[a-z]'; $u='[A-Z]'; $a='[a-zA-Z]';
- $patt = "/\/" . $l . $u . $a . $a . $a . "\//";
- $url_v = preg_replace($patt, "/", $url_v, -1, $count);
- $n_replacements += $count;
- $patt = "/\/" . $a . $l . $u . $a . $a . "\//";
- ...
- ...
- <script type="text/javascript">location.href = '<? echo $url_v; ?>';</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement