1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

php script to browse internet

Discussion in 'Proxies' started by forthisbh, Aug 6, 2013.

Tags:
  1. forthisbh

    forthisbh Newbie

    Joined:
    Aug 1, 2013
    Messages:
    31
    Likes Received:
    0
    Using shared website hosting

    is there a php script that can allow me to browse all pages on the internet
    where websites think that visiting ip of shared website hosting, not desktop computer


    maybe it is just iframe
     
  2. SPPChristian

    SPPChristian Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 20, 2012
    Messages:
    1,221
    Likes Received:
    239
    Location:
    United States
    Home Page:
    You can use this for an iframe
    Code:
    <?php
        $address = $_GET['address']
    ?>
    
    <html>
    <head>
    </head>
        <body>
            <div id="header">
                <form method="GET" action="">
                    <input name="address" type="address" id="address" placeholder="address"/>
                    <input type="submit" value="Go" id="submit"/>
                </form>
            </div>
            <div id="body">
                <iframe src="<?php echo $address ?>" id="frame" height="640px" width="480px" />
            </div>
        </body>
    </html>
    
    Or you can use curl() function or file_get_contents()

    Code:
    <?php
    
    
    
    $opts = array(
      'http'=>array(
        'method'=>"GET",
        'header'=>"Accept-language: en\r\n" .
                  "Cookie: foo=bar\r\n"
      )
    );
    
    $context = stream_context_create($opts);
    
    $loadfile = file_get_contents('http://www.google.com', false, $context);
    
    echo $loadfile;
    
    ?>
    
    or both mixed together

    Code:
    <?php
    
    $opts = array(
      'http'=>array(
        'method'=>"GET",
        'header'=>"Accept-language: en\r\n" .
                  "Cookie: foo=bar\r\n"
      )
    );
    
    $context = stream_context_create($opts);
    $address = $_GET['address'];
    $file = file_get_contents($address, false, $context);
    
    ?>
    
    <html>
    <head>
    </head>
        <body>
            <div id="header">
                <form method="GET" action="">
                    <input name="address" type="address" id="address" placeholder="address"/>
                    <input type="submit" value="BROWSE" id="submit"/>
                </form>
            </div>
            <div id="body">
    <?php echo $file ?>
            </div>
        </body>
    </html>
    
     
    • Thanks Thanks x 1
    Last edited: Aug 6, 2013