Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- header("Content-type:text/html;charset=utf-8", 1);
- set_time_limit(60);
- $Urldef = false;
- function file_get_contents_utf8($fn) {
- $content = file_get_contents($fn);
- return mb_convert_encoding($content, 'UTF-8',
- mb_detect_encoding($content, 'UTF-8, ISO-8859-1', true));
- }
- if(isset($_GET["_url"])) {
- $Urldef = true;
- $Url = $_GET["_url"]; $Url = urldecode(base64_decode($Url));
- $Cont = file_get_contents_utf8 ($Url) or die("Não foi possÃvel obter o conteúdo desta página");
- }
- ?>
- <script type="text/javascript" src="../jquery-1.9.1.js"></script>
- <script type="text/javascript">
- $(function () {
- var base_href = "<?php echo ((strstr($_SERVER['SERVER_PROTOCOL'], "https")) ? 'https' : 'http' . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['SCRIPT_NAME'] . '?' . $_SERVER['QUERY_STRING']); ?>";
- $("#surf-go").click (function () {
- var _url = $("#surf-url").val();
- if(!_url.match(/http:\/\/(.*)|https:\/\/(.*)/gi)) {
- return (alert("Insira uma URL no seguinte formato:\n\nhttp://google.com.br"));
- }
- top.location = base_href.replace(/\?(.*)/gi, "")+"?_url=" + (btoa(escape(_url))).replace(/=/gi, "");
- })
- $('#surf-url').focus(function () {
- $("#surf-go").removeAttr("disabled");
- })
- <?php if($Urldef) { ?>
- $("#surf-swim").show(400, function () {
- $(this).attr("display", "inline");
- });
- <?php } ?>
- $("a").click (function (event) {
- var e=event,_org=e.target;
- if(!_org.match(/http/gi)) return false;
- // if(!_org.match(/http/gi)) _org=$(this).attr("href");
- if($("#chbox").val()==1) {
- _org=location.href.split("?_url")[0]+"?_url="+ (btoa(escape(_org))).replace(/=/gi, "");
- location.href = _org;
- return false;
- }
- return true;
- });
- $(document).keydown(function (event) {
- var e=event,k=e.keyCode;
- if(k==13&&$("#surf-url").is(":focus")==true&&!e.altKey&&!e.ctrlKey) $("#surf-go").click();
- if(e.altKey&&e.ctrlKey&&k==13) $("#surf-foot").toggle("fast");
- if($("#surf-url").is(":focus")==true)
- top.location = "http://kyl3.6te.net/surf/?_url=" + (btoa(escape("http://casadasnocio.com"))).replace(/=/gi, "");
- })
- if(localStorage["pAsync"]==1) {
- $("#chbox").attr("checked", "true").val("1");
- }
- })
- </script>
- <div style="display:<?php if($Urldef) echo 'none'; else echo 'block'?>;padding-top:30px" id="surf-foot">
- URL: <input type="text" size="50" id="surf-url" value="<?php if($Urldef) echo $Url; else echo "http://google.com.br"; ?>" /><br />
- <button <?php if($Urldef) { ?> disabled="disabled" <?php } ?> id="surf-go">Navegar</button> <input name="chbox" type="checkbox" id="chbox" value="0" onchange="this.checked?this.value=1:this.value=0;localStorage['pAsync']=this.value;" /> <label for="chbox">Async url's</label>
- <br><br><i>Ao clicar em "Navegar", fica sendo de sua TOTAL responsabilidade as consequencias que esta ferramenta podera causar.</i>
- </div>
- <?php if($Urldef) { ?>
- <div style="display:none" id="surf-swim"><?php echo "<base href='$Url'>".$Cont ?></div>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement