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

hide my ass vpn PHP script

Discussion in 'Proxies' started by toosmooth, Apr 9, 2012.

  1. toosmooth

    toosmooth Registered Member

    Joined:
    Feb 24, 2012
    Messages:
    77
    Likes Received:
    36
    Location:
    canada
    Hey dose any one know if it is possible to change your ip address via hidemyass vpn from a php script?
     
  2. humancoder

    humancoder Junior Member

    Joined:
    Aug 13, 2010
    Messages:
    103
    Likes Received:
    53
    Occupation:
    Marketing
    Location:
    BHW
    Home Page:
    its samiller to this
    Code:
    [URL]http://www.bestproxyandvpn.com/video/77-using-proxies-in-php-scripts.html[/URL]
     
  3. SaleC

    SaleC Newbie

    Joined:
    Aug 23, 2011
    Messages:
    40
    Likes Received:
    347
    I need to fix my existing code.
    put this to .bat file
    Code:
    set host=hidemyass.com
    "C:\Program Files\HMA! Pro VPN\bin\HMA! Pro VPN.exe" -changeip  
    :wait
    ping -n 1 %host% | find "Reply from" >nul
    if errorlevel 1 goto wait
    
    Ofc doublecheck path :)

    use exec command to call bat file from php script

    Now that is working right :) We have another problem now.HMA VPN is changing ip in roughly 2 steps
    1.It disconnects from existing connection and now you have your ip like VPN is not active at all
    2.It connects again and give you new ip
    Problem with solution i have is that bat file ping host while my original ip is active and i pick signal that ip is changed sooner than i want (i want signal when i get new ip)

    I could ofc put random (long) sleep to make sure ip is changed but that is not how i do stuff :)
    If anyone want to jump in with good solution ty in advance.If not i ll be back soon with my best solution.

    Also keep in mind that many ip you get from HMA are blocked on google and other places. If you are doing automation maybe it is smart to check new ip with some code (curl google.com,pregmatch error code and if found get new ip ......)