Go Back   WhatIsMyIP.comŽ Forum > All About Code > Coding Problems

Notices

Closed Thread
 
Thread Tools Display Modes
Old 06-21-2012, 11:57 AM   #1
cordobatsi
Member
 
Join Date: Jun 2012
Posts: 2
cordobatsi is on a distinguished road
Default Automation Help Request

hi people. I using the following script from DOS command line to obtain my external ip address.

Code:
On Error Resume Next
Set WinHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
WinHttpReq.SetTimeouts 30000,9000,15000,15000
WinHttpReq.Open "GET", "http://automation.whatismyip.com/n09230945nl.asp", False
WinHttpReq.SetRequestHeader "Cache-Control", "no-cache"
WinHttpReq.SetRequestHeader "Pragma", "no-cache"
WinHttpReq.Send 
If Err.Number = 0 Then
   If WinHttpReq.Status = "200" Then
      WScript.Echo WinHttpReq.ResponseText
   Else
      WScript.Echo "HTTP " & WinHttpReq.Status & " " & WinHttpReq.StatusText
   End If
Else
   WScript.Echo "Error " & " " & Err.Number & " " & Err.Source & " " & Err.Description
End If
Err.Clear
It runs fine in an direct internet connection or using only a modem-router but if i connected through the proxy it report only the internal ip address.
If check my ip from the home page or the facebook page of WIMI it report the right external IP and see my proxy too...
can u help me to obtain the real external ip? any idea?
Thanks!

Dennis

Last edited by wimiadmin; 06-21-2012 at 12:03 PM.
cordobatsi is offline  
Old 06-21-2012, 12:03 PM   #2
wimiadmin
Administrator
 
wimiadmin's Avatar
 
Join Date: May 2008
Location: Pigeon Forge, TN
Posts: 1,511
wimiadmin is a splendid one to beholdwimiadmin is a splendid one to beholdwimiadmin is a splendid one to beholdwimiadmin is a splendid one to beholdwimiadmin is a splendid one to beholdwimiadmin is a splendid one to beholdwimiadmin is a splendid one to behold
Default

Hi Dennis. Thanks for joining the forum. I've moved this thread to our Coding section as we have a few regulars that check here and will hopefully chime in when they see your question.
__________________
Brian
Please Search Before Posting
wimiadmin is offline  
Old 06-21-2012, 12:09 PM   #3
cordobatsi
Member
 
Join Date: Jun 2012
Posts: 2
cordobatsi is on a distinguished road
Default

OK Brian, Thanks!
cordobatsi is offline  
Closed Thread

Bookmarks

Tags
automation external ip

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:25 AM.


What Is My IP

Join WhatIsMyIP.com on Facebook Follow WIMI on Twitter

Need IP address location detection service? Get it from IP2Location.com now.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright - WhatIsMyIP.comŽ