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

php script to change ip address

Discussion in 'Black Hat SEO' started by forthisbh, Aug 1, 2013.

  1. forthisbh

    forthisbh Newbie

    Joined:
    Aug 1, 2013
    Messages:
    31
    Likes Received:
    0
    I have a php script

    $config['proxy'] = 'website with numerical port number';
    $config['proxy_username'] = '';
    $config['proxy_password'] = '';


    what is a service I can use that has a proxyaddress : port, username,password
    where I can run this php script from the same ip address (localhost for example) and the recipient thinks I am using a different ip address
     
  2. bytzu

    bytzu Registered Member

    Joined:
    Jun 30, 2011
    Messages:
    98
    Likes Received:
    140
    try something like this:

    PHP:
    <?php

    $proxy 
    "xx.xx.xx.xx:xx";
    $proxy explode(':'$proxy);
    $url "http://www.google.com";

    $ch curl_init();
    curl_setopt($chCURLOPT_URL$url);
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
    curl_setopt($chCURLOPT_PROXY$proxy[0]);
    curl_setopt($chCURLOPT_PROXYPORT$proxy[1]);
    curl_setopt($chCURLOPT_HEADER1);
    $exec curl_exec($ch);

    ?>
     
    • Thanks Thanks x 1
  3. cryptons

    cryptons Jr. VIP Jr. VIP Premium Member

    Joined:
    Jun 12, 2013
    Messages:
    1,254
    Likes Received:
    449
    Occupation:
    Developer,social marketer
    Thnx bytzu!
     
  4. SPPChristian

    SPPChristian Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 20, 2012
    Messages:
    1,245
    Likes Received:
    248
    Occupation:
    https://www.sslprivateproxy.com
    Location:
    United States
    Home Page:
    or this for proxies with user and password

    Code:
    <?PHP
    function curlbrowse($url,$proxy_ip,$proxy_port,$loginpassw)
    {
        $loginpassw = 'username:password';
        $proxy_ip = 'proxy ip';
        $proxy_port = 'proxy port';
        $url = 'http://www.domain.com';
    
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_PROXYPORT, $proxy_port);
        curl_setopt($ch, CURLOPT_PROXYTYPE, 'HTTP');
        curl_setopt($ch, CURLOPT_PROXY, $proxy_ip);
        curl_setopt($ch, CURLOPT_PROXYUSERPWD, $loginpassw);
        $data = curl_exec($ch);
        curl_close($ch);
    
        return $data;
    }
    
    ?>
     
  5. royserpa

    royserpa Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 28, 2011
    Messages:
    4,901
    Likes Received:
    3,663
    Gender:
    Male
    Occupation:
    Negative Options aka Rebills!
    Location:
    Roy's VCCs e-Shop
    Home Page:
    Beat me to it guys. :D
    Nice codes.