lib/ShortPixel/Client.php
function imageStatus($key, $url) {
        $request = curl_init();
        curl_setopt_array($request, $this->options);
        //$this->prepareJSONRequest(self::API_STATUS_ENDPOINT(), $request, array('key' => $key), 'post', array());
        curl_setopt($request, CURLOPT_URL, self::IMAGE_STATUS_ENDPOINT());
        curl_setopt($request, CURLOPT_CUSTOMREQUEST, 'POST');
        curl_setopt($request, CURLOPT_HTTPHEADER, array());
        $params = array('key' => $key, 'url' => $url);
        curl_setopt($request, CURLOPT_POSTFIELDS, json_encode($params));
        return $this->sendRequest($request, 1);
    }
function imageStatus($key, $url) {
        $request = curl_init();
        curl_setopt_array($request, $this->options);
        //$this->prepareJSONRequest(self::API_STATUS_ENDPOINT(), $request, array('key' => $key), 'post', array());
        curl_setopt($request, CURLOPT_URL, self::IMAGE_STATUS_ENDPOINT());
        curl_setopt($request, CURLOPT_CUSTOMREQUEST, 'POST');
        curl_setopt($request, CURLOPT_HTTPHEADER, array());
        $params = array('key' => $key, 'url' => $url);
        curl_setopt($request, CURLOPT_POSTFIELDS, json_encode($params));
        return $this->sendRequest($request, 1);
    }
function imageStatus ( $ key , $ url ) { $ request = curl_init ( ) ; curl_setopt_array ( $ request , $ this -> options ) ; //$this->prepareJSONRequest(self::API_STATUS_ENDPOINT(), $request, array('key' => $key), 'post', array()); curl_setopt ( $ request , CURLOPT_URL , self :: IMAGE_STATUS_ENDPOINT ( ) ) ; curl_setopt ( $ request , CURLOPT_CUSTOMREQUEST , 'POST' ) ; curl_setopt ( $ request , CURLOPT_HTTPHEADER , array ( ) ) ; $ params = array ( 'key' => $ key , 'url' => $ url ) ; curl_setopt ( $ request , CURLOPT_POSTFIELDS , json_encode ( $ params ) ) ; return $ this -> sendRequest ( $ request , 1 ) ; }
Method that checks the status of an image being optimized
@param $key
@param $url
@return array
@throws ConnectionException
Method that checks the status of an image being optimized