WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

HTTP Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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:

  1. 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) 
    
  2. 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.ipaddr
    
    and see if it resolves to a name.

Article ID:   W12662
Filename:   httpRecvFile when not DNS Served.txt
File Created: 2001:03:01:15:07:56
Last Updated: 2001:03:01:15:07:56