BE_HTTP_GET ( url {; filename ; username ; password } )


Does a http GET function and returns the results. This uses the curl library so output will be similar to that. This is used in conjunction with the BE_HTTP_Set_Custom_Header function to set custom headers in advance and the BE_HTTP_Response_Code and BE_HTTP_Response_Headers functions to get the result values after the GET is complete.


Version : 1.2

Version : 3.3.0 Renamed to BE_HTTP_GET from BE_GetURL 

Parameters :
url : the url to retrieve.
filename ( optional ) : Required if you're saving the contents of the url ( i.e. text or a file ) into a container field. The container field uses the name supplied here for the name of the resulting file.
username ( optional ) : The username if the url requires authentication.
password ( optional ) : The password if the url requires authentication.


Result : The result values from the url.



Some useful header options :


BE_Curl_Set_Option ( "CURLOPT_FOLLOWLOCATION" ; 1 ) will mean that it will follow a 301 redirect.

BE_Curl_Set_Option ( "CURLOPT_HTTPAUTH" ; 1 ) forces Basic auth for some sites that won't work with the defaults.


Have more questions? Submit a request


Article is closed for comments.