tcp.httpReadUrl

Syntax tcp.httpReadUrl (url)

Params url is the URL of a web page whose source you want to get.

Action Gets the source of a web page via TCP.

Returns A string, the source of the page.

Examples tcp.httpReadUrl ("http://frontier.userland.com/")

   "<html>\r\n <head><title>Frontier: What is Frontier?</title></head>\r\n \r\n <body bgcolor=\"FFFFF0" text="000000" link="336699" vlink="336666" alink="336699">r\n..."

tcp.httpReadUrl ("http://docserver.userland.com:80/discuss/msgReader$982")

   "<html>\r\n <head><title>tcp.httpReadUrl</title></head>\r\n \r\n <body bgcolor=\"FFFFF0" text="000000" link="336699" vlink="336666" alink="336699">r\n..."

Notes This verb is an easy way to get a web page. It's implemented as a script, wrapping a call to the more complex tcp.httpClient.

You can include the port in the URL, as in http://myserver.com:8080/foo.html, if the webserver is on a port other than 80.

The HTTP response headers from the server are not returned: only the source of the page itself is returned.

This verb is new in Frontier 6.1.

See Also tcp.httpClient

Discuss