app/Ragnarok/Soul/RagnarokCurl.php
public function httpStatusConnection($url)
    {
        if ( ! filter_var($url, FILTER_VALIDATE_URL)) {// check, if a valid url is provided
            return false;
        }

        $handle = curl_init($url);
        curl_setopt($handle,  CURLOPT_RETURNTRANSFER, true);
        curl_setopt($handle, CURLOPT_FOLLOWLOCATION, true);// 301 solved
        $response = curl_exec($handle);
        $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
        curl_close($handle);

        return $httpCode == 200 ? true : false;
    }
public function httpStatusConnection($url)
    {
        if ( ! filter_var($url, FILTER_VALIDATE_URL)) {// check, if a valid url is provided
            return false;
        }

        $handle = curl_init($url);
        curl_setopt($handle,  CURLOPT_RETURNTRANSFER, true);
        curl_setopt($handle, CURLOPT_FOLLOWLOCATION, true);// 301 solved
        $response = curl_exec($handle);
        $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE);
        curl_close($handle);

        return $httpCode == 200 ? true : false;
    }
public function httpStatusConnection ( $ url ) { if ( ! filter_var ( $ url , FILTER_VALIDATE_URL ) ) { // check, if a valid url is provided return false ; } $ handle = curl_init ( $ url ) ; curl_setopt ( $ handle , CURLOPT_RETURNTRANSFER , true ) ; curl_setopt ( $ handle , CURLOPT_FOLLOWLOCATION , true ) ; // 301 solved $ response = curl_exec ( $ handle ) ; $ httpCode = curl_getinfo ( $ handle , CURLINFO_HTTP_CODE ) ; curl_close ( $ handle ) ; return $ httpCode == 200 ? true : false ; }
Check the connection status
@param $url
@return bool
Check the connection status