httpRecvFile when not DNS Served
Keywords: DNS served
Question:
I am trying to use HttpRecvFile to get a text file from a web server that is set up to respond on port 1080, instead of 80. I'm not having much luck. Here's the code:LogTimeFile = "c:\temp\ShivaLogTime.txt URLpath = httpGetPath("http://198.39.250.22:1080/~LOG0002.TXT?N'log%%20outs'M'logged%%20out'", "") URLServer = httpGetServer("http://198.39.250.22:1080/~LOG0002.TXT?N'log%%20outs'M'logged%%20out'", "") err1 = httpRecvFile(URLServer, URLPath, LogTimeFile, 0)Thanks.Answer:
- The URLGetServer function is stripping off the port information. Maybe try coding the stuff directly.
AddExtender("wwwsk34I.dll") LogTimeFile = "c:\temp\ShivaLogTime.txt URLpath = "/~LOG0002.TXT?N'log outs'M'logged out'" URLServer = "198.39.250.22:1080" Message(URLServer,URLPath) err1 = httpRecvFile(URLServer, URLPath, LogTimeFile, 0)- I note usage of an IP address instead of a real Internet server name. The WinSock extender *requires* that a machine be properly DNS served to function. You may wish to investigate using the WININET extender. It does not have the DNS requirement.
To test, start a command prompt and type...
ping -a the.ip.address.ipaddrand see if it resolves to a name.
Article ID: W12662Filename: httpRecvFile when not DNS Served.txt