Monkey data domain name anti blocking interface reduces the risk of novel being blocked

Keywords: PHP curl

Recently, there have been frequent complaints on the Internet that the novels they read have been sealed, even if they are not vulgar novels, or they have been shared too many times. The readers are upset and angry, but the business should be the more dry. Especially for paid distribution businesses, the painstaking public numbers are basically finished. For users who still have violations, the platform will increase the penalties. If the account number is seriously violated, it will be permanently blocked and cannot be unsealed. Please do not unseal through the third-party platform. For such abnormal unsealing behavior, it will be blocked again.
The monkey data domain seal technology is real-time automatic detection, multi-level encryption and jump, to prevent the public domain name from being exposed directly, and effectively protect the business domain name of the public number. Monkey data wechat domain name anti sealing is implemented by a professional technical team to avoid traffic loss and share a code for your reference. More code exchanges + V:mkapi001,+Q1401806570

$url = "http://api.monkeyapi.com";
$params = array(
'appkey' =>'appkey',//APPKEY you applied for
'url' =>'www.url.com',//Websites to query
);

$paramstring = http_build_query($params);
$content = Curl($url, $paramstring);
$result = json_decode($content, true);
if($result) {
    var_dump($result);
}else {
    //Request exception
}

/**
    * Request interface return content
    * @param    string $url [Requested URL address]
    * @param    string $params [Requested parameters]
    * @param    int $ipost [POST or not]
    * @return    string
*/
function Curl($url, $params = false, $ispost = 0)
{
    $httpInfo = array();
    $ch = curl_init();

    curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
    curl_setopt($ch, CURLOPT_TIMEOUT, 60);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    if ($ispost) {
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
        curl_setopt($ch, CURLOPT_URL, $url);
    }else {
        if ($params) {
            curl_setopt($ch, CURLOPT_URL, $url.'?'.$params);
        } else {
            curl_setopt($ch, CURLOPT_URL, $url);
        }
    }

    $response = curl_exec($ch);
        if ($response === FALSE) {
        //echo "cURL Error: " . curl_error($ch);
        return false;
    }

    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    $httpInfo = array_merge($httpInfo, curl_getinfo($ch));
    curl_close($ch);
    return $response;
}

Posted by psycovic23 on Thu, 05 Dec 2019 13:15:25 -0800