Now the network is still very messy, especially full of various advertisements, pornography, political-related content, it is obvious that this is not in accordance with our country's law, so in order to a product can live a long and healthy life, it is better to use a certain strategy to filter or remind users not to send such content. But it's easier said than done, and it's still difficult to implement. The simplest way is to call the existing interface. Take php as an example:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

 * @author 
 * @copyright 2019
header("content-type:text/html;charset=utf-8");         //Set encoding
//Configure the appKey and openId you applied for
$app_key = "***";
$open_id = "***";

$url Request address
$params Request parameters
$ispost Request method

function http_curl($url,$params=false,$ispost=false){
    $httpInfo = array();
    $ch = curl_init();

    curl_setopt( $ch, CURLOPT_HTTP_VERSION , CURL_HTTP_VERSION_1_1 );
    curl_setopt( $ch, CURLOPT_USERAGENT , "xiaocongjisuan");
    curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT , 60 );
    curl_setopt( $ch, CURLOPT_TIMEOUT , 60);
    curl_setopt( $ch, CURLOPT_RETURNTRANSFER , true );
    if( $ispost )
        curl_setopt( $ch , CURLOPT_POST , true );
        curl_setopt( $ch , CURLOPT_POSTFIELDS , $params );
        curl_setopt( $ch , CURLOPT_URL , $url );
            curl_setopt( $ch , CURLOPT_URL , $url.'?'.$params );
            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;

function main(){
    global $app_key;
    global $open_id;
    //Variable part
    $params["content"]="Please don't leave your buttons to find your partner.";
    //Code conversion
    foreach ($params as $key=>$value) {
        $params[$key]=mb_convert_encoding($value, "UTF-8", "GBK");

    $paramstring = http_build_query($params);
    $content = http_curl($url,$paramstring,true);
    return $content;

echo main();

Obviously this approach is very simple, and if you don't like to use php, you can use other languages. Take python for example:

# -*- coding: utf-8 -*-
# flake8: noqa
__author__ = 'wukong'

import urllib
from urllib import urlencode

#Configure the appKey and openId you applied for

request_url Request address
params Request parameters
method Request method

def request_content(request_url,params,method):
    params = urlencode(params)
    if method and method.lower() =="get":
        f = urllib.urlopen("%s?%s" % (request_url, params))
        f = urllib.urlopen(request_url, params)
    content =
    print content

def main():

    params ={}
    #Variable part
    params["content"]="Please don't leave your buttons to find your partner."
if __name__ == '__main__':

As for the implementation of other languages, there are ready-made code, you can Jump here Check it out.