// Checks whether the URL is full-qualified (http[s]:// + hostname [+ request data])
function isFullQualifiedUrl ($url) {
- // Do we have cache?
+ // Is there cache?
if (!isset($GLOBALS[__FUNCTION__][$url])) {
// Determine it
$GLOBALS[__FUNCTION__][$url] = ((substr($url, 0, 7) == 'http://') || (substr($url, 0, 8) == 'https://'));
// There should be data, else we don't need to extend $baseUrl with $body
if (!empty($body)) {
- // Do we have a question-mark in the script?
+ // Is there a question-mark in the script?
if (!isInString('?', $baseUrl)) {
// No, so first char must be question mark
$body = '?' . $body;
// Generate full GET URL
$getUrl = generateGetUrlFromBaseUrlData($baseUrl, $requestData);
- // Do we have http[s]:// in front of the URL?
+ // Is there http[s]:// in front of the URL?
if (isFullQualifiedUrl($getUrl)) {
// Remove http[s]://<hostname> from URL
$getUrl = removeHttpHostNameFromUrl($getUrl);
// Generate full GET URL
$getUrl = generateGetUrlFromBaseUrlData($baseUrl, $requestData);
- // Do we have http[s]:// in front of the URL?
+ // Is there http[s]:// in front of the URL?
if (isFullQualifiedUrl($getUrl)) {
// Remove http[s]://<hostname> from url
$getUrl = removeHttpHostNameFromUrl($getUrl);
// Copy baseUrl to getUrl
$getUrl = $baseUrl;
- // Do we have http[s]:// in front of the URL?
+ // Is there http[s]:// in front of the URL?
if (isFullQualifiedUrl($getUrl)) {
// Remove http[s]://<hostname> from url
$getUrl = removeHttpHostNameFromUrl($getUrl);
return $response;
}
- // Do we use proxy?
+ // Shall proxy be used?
if (isProxyUsed() === true) {
// Setup proxy tunnel
$response = setupProxyTunnel($host, $proxyHost, $port, $resource);