;;=====================================================================================----- 
;Function	GetURL() - Deprecated in ITCG Coding - See URL() for full functionality 
; 
;Action         Gets the HTML from a given web page or FTP site. 
; 
;Authors 	Bryce 
; 
;Version 	1.0  - 2003/12/02 
; 
;History 	1.0  - 2003/12/02 - Initial Release 
; 
;Syntax 	GetURL(URL[, USERNAME] [, PASSWORD]) 
; 
;Parameters  
;		URL - Required - String 
;               - Path to the URL you want to get 
;		USERNAME - Optional - String 
;               - a given username to be used 
;		PASSWORD - Optional - String 
;               - A password to be used for the username 
; 
;Returns 	The HTML of the given URL 
; 
;		on error errorcodes returned and set: 
;			1 -failed to initialize http-object 
;			3 -failed to open connection 
; 
;Dependencies 	IE5 or higher 
; 
;Remarks	I stole the error routines to match up with lonkeros own FTPGet() Udf 
; 
;Examples 
;		"Getting HTML Code from http://kix.isorg.com/other_scripts" 
;		$html = GetURL("http://kix.isorg.com/other_scripts/") 
;		? $html 
; 
function GetURL($url,Optional $user, optional $passwd)
	dim $G_IECOM
	$G_IECOM = createobject("microsoft.xmlhttp")
	if @error exit(1) endif
 
	if $user and $passwd
		$g_iecom.open("GET", $url, not 1,$user,$passwd)
	else
		$g_iecom.open("GET", $url, not 1)
	endif
	if @error exit(3) endif
	$g_iecom.send
	$GetUrl = $g_iecom.responsetext
endfunction
 
 
function PutURL($url,Optional $user, optional $passwd)
	dim $G_IECOM
	$G_IECOM = createobject("microsoft.xmlhttp")
	if @error exit(1) endif
 
	if $user and $passwd
		$g_iecom.open("PUT", $url, not 1,$user,$passwd)
	else
		$g_iecom.open("PUT", $url, not 1)
	endif
	if @error exit(3) endif
	$g_iecom.send
	$GetUrl = $g_iecom.responsetext
endfunction
 
 
function PostURL($url,Optional $user, optional $passwd)
	dim $G_IECOM
	$G_IECOM = createobject("microsoft.xmlhttp")
	if @error exit(1) endif
 
	if $user and $passwd
		$g_iecom.open("POST", $url, not 1,$user,$passwd)
	else
		$g_iecom.open("POST", $url, not 1)
	endif
	if @error exit(3) endif
	$g_iecom.send
	$GetUrl = $g_iecom.responsetext
endfunction