Bitrix Site Manager


  string site,
  int port,
  string page,
  string query,
  int &error_number,
  string &error_text,
  string http_method = "GET",
  string site_prefix = ""

The function QueryGetData queries the specified web address using the HTTP protocol. Returns the server response body without header. If an error occurres, the function returns an empty string and set parameters error_number and error_text.


site Address of the site to query.
port Port number. Usually 80.
page Path to the requested page.
query String with the query parameters in the common format.
error_number Reference to a variable that receives the error number on failure.
error_text Reference to a variable that receives the error description on failure.
http_method Method to use for querying the remote server. The following values are possible:
  • "GET"
  • "POST"
Optional; GET by default.
site_prefix Site address prefix for work through SSL or TLS. The following values are possible:
  • ""
  • "ssl://"
  • "tls://"
Optional, the default value is "" which means standard connection.

Your hosting may not support non-standard connections.


// Query for currency exchange rates from on 18.01.2005
$strQueryText = QueryGetData(
if (strlen($strQueryText)<=0)
   echo "Query error!";
   if (intval($error_number)>0 || strlen($error_text)>0)
      echo ": (".$error_number.") ".$error_text;
   echo ". ";
   echo htmlspecialchars($strQueryText);