Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 13 MAY 2005 10:04:55AM Wilhelm Schmitt wrote:

How do I include the port number in a URL called through the GetWebPage function?

The call to getwebpage("http://www.xyz.com") resolves but getwebpage("http://xyz.com:12345")returns the error SOCK102: Unable to resolve host DNS entry.

Both are supposed to be valid URLs.

Regards

Wilhelm


At 17 MAY 2005 08:43AM Bob Carten wrote:

Wilhelm

The 7.1.1 version of getwebpage does not parse out the port.

I will fix that for the next version

In the meantime, try

Subroutine test_ole_getwebpage(url)

/*

Ole retrieval of web pages url should be fully qualified, e.g. http://www.revelation.com

Requires OI 7.1, WinXP SP1, Win2k SP3 or Win2003 server

see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winhttp/http/retrieving_data_using_script.asp rjc 05-17-05 Created

*/

$Insert Logical

if assigned(url) else url='

if len(url) else

return ''

end

WinHttpReq=OleCreateInstance('WinHttp.WinHttpRequest.5.1')

Create an HTTP request. ret=OleCallMethod(WinHttpReq, 'Open',"GET", URL, false$); Send the HTTP request.

ret=OleCallMethod(WinHttpReq, 'Send')

Retrieve the response text. html=OleGetProperty(WinHttpReq, 'ResponseText') return html </QUOTE> View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/a28bcff7567f3b3c85257000004d5ad6.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1