GetHTTPHeader()
Syntax
Result$ = GetHTTPHeader(URL$)Description
Get the HTTP headers of the given URL. The content of the headers are dependent on the type of server and therefore their contents vary, but the header that is returned by that server, provides very useful information about the file, such as the date, the server type, the version, and more. The URL must be fully qualified, and must include the "http://" prefix.
InitNetwork() has to be called before using this command.Example:
InitNetwork() Header$ = GetHTTPHeader("http://www.purebasic.com/index.php3") Repeat Index+1 Line$ = StringField(Header$, Index, #LF$) Debug Line$ Until Line$ = ""The Result$ is a string containing lines, each of which ends with the #LF$ character. StringField() can be used to split it into several strings.
Example of returned headers:HTTP/1.1 200 OK Date: Fri, 21 Mar 2008 09:49:30 GMT Server: Apache/1.3.34 (Debian) mod_vhost_online/1.1 mod_fastcgi/2.4.2 mod_log_online/0.1 X-Powered-By: PHP/4.4.8-1 Content-Type: text/html
Supported OS
All