Detailed Explanation of Domain Name Anti-blocking and Jump System for Writer H5 Activity Text Link

Keywords: Mobile Java Android JSON

All along, we have been constantly impacted by the novel and explosive H5, the brain is stimulated again and again, good H5 activity text in the tweets and friends circle fire, after reading it, but let us not forget for a long time, we subconsciously triggered emotional resonance! Then the problem arises. After carefully planning the copy of the H5 event, the number of times it was shared too much or it was reported by the peers, all of it was returned to zero - it was killed by the micro-envelope! So how to prevent the H5 active text link domain name from being blocked?

Scenes like this are presented to the public in the form of text, pictures and two-dimensional codes, so we will start from these aspects.
The key point here is the picture!! This has to have a certain degree, many big guys in order to cause eye demand, using too exposed and too sexy pictures, which is easy to be judged as H color by Wechat, and then easy to be sealed.

In addition, the two-dimensional code recognition, many anti-blocking can not be compatible with Apple's two-dimensional code recognition, can not be recognized by long press, but need to save the two-dimensional code to the opposite side, and then use a sweep to identify, so cumbersome steps, not to mention no advantage, but also cause users'disgust, so as to complain, as long as the number of complaints is more, it is easy to be sealed.

Someone will wonder, I have noticed from all sides, why was it still killed by the micro-envelope? So I'll tell you here, there are too many factors to be sealed. Among them, we can go to Baidu to search for the relevant rules of Weixin. The so-called defense is insurmountable. What we need to do is to do a good job of defense, reduce our losses to the minimum, and maximize the benefits of promotion. So how to do defense? Here are some jump systems for your reference:

1. Now many friends contact the anti-sealing strategy is to use the landing area name as meat shield, an entrance with a number of landing area names, so that the landing area name for rotation, if landing A is sealed, immediately change the landing area name B, here can be manually changed, can also write programs to achieve automatic change, but this very expensive domain name, especially with some sensitive or gray industry, that day is not allowed. There are hundreds of domain names that can't be done. They are all pushed by domain names, and domain names are priced one day, sometimes at a high price. Many bosses can't push them directly. This approach is not fundamental to some industries.

2. There is another way to do jump, detailed analysis, the envelope is only said to be blocked in the Wechat environment, if it is said that the automatic jump to the external browser of the mobile phone can solve this problem, but this is also a certain limitation, if we have to implement the latter part in the Wechat environment, this is not so appropriate, and so far, only to achieve Android. Because of the limitation of the Apple side, the jump still needs to be guided manually.
3. Multi-level encryption jump anti-blocking, through the generation of anti-blocking short links, effectively protect the original link from being found, should be said to be the most technical content of anti-blocking, a variety of scenarios are applicable, especially QP, BC, the effect bar.

After that, I hope the above strategies will be helpful to all of you and look forward to new discoveries. If necessary, please contact me.
Finally, share the code for technical friends to refer to:

import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.Map;

import net.sf.json.JSONObject;

public class Demo {
  public static final String DEF_CHATSET = "UTF-8";
  public static final int DEF_CONN_TIMEOUT = 30000;
  public static final int DEF_READ_TIMEOUT = 30000;
  public static String userAgent =  "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.66 Safari/537.36";

  public static void mobileQuery(){
      String result =null;
      String url ="http://api.monkeyapi.com";//Request interface address
      Map params = new HashMap();//Request parameters
        params.put("appkey" , "appkey");//The APKEY you applied for
        params.put("url" , "www.monkeyapi.com");//Websites to be queried
      try {
          result = net(url, params, "GET");
          JSONObject object = JSONObject.fromObject(result);
          if(object.getInt("error_code")==0){
            System.out.println(object.get("result"));
          }else{
            System.out.println(object.get("error_code")+":"+object.get("reason"));
          }
      } catch (Exception e) {
        e.printStackTrace();
      }
  }

  public static void main(String[] args) {

  }

  /**
   *
   * @param  strUrl Request address
   * @param  params Request parameters
   * @param  method Request method
   * @return    Network Request String
   * @throws  Exception
   */
  public static String net(String strUrl, Map params,String method) throws Exception {
     HttpURLConnection conn = null;
     BufferedReader reader = null;
     String rs = null;
     try {
        StringBuffer sb = new StringBuffer();
        if(method==null || method.equals("GET")){
          strUrl = strUrl+"?"+urlencode(params);
        }
        URL url = new URL(strUrl);
        conn = (HttpURLConnection) url.openConnection();
        if(method==null || method.equals("GET")){
           conn.setRequestMethod("GET");
        }else{
           conn.setRequestMethod("POST");
           conn.setDoOutput(true);
        }
        conn.setRequestProperty("User-agent", userAgent);
        conn.setUseCaches(false);
        conn.setConnectTimeout(DEF_CONN_TIMEOUT);
        conn.setReadTimeout(DEF_READ_TIMEOUT);
        conn.setInstanceFollowRedirects(false);
        conn.connect();
        if (params!= null && method.equals("POST")) {
           try {
              DataOutputStream out = new DataOutputStream(conn.getOutputStream());
              out.writeBytes(urlencode(params));
           } catch (Exception e) {
              // TODO: handle exception
              e.printStackTrace();
           }
        }
       InputStream is = conn.getInputStream();
       reader = new BufferedReader(new InputStreamReader(is, DEF_CHATSET));
       String strRead = null;
       while ((strRead = reader.readLine()) != null) {
         sb.append(strRead);
       }
       rs = sb.toString();
     } catch (IOException e) {
       e.printStackTrace();
     } finally {
       if (reader != null) {
          reader.close();
       }
       if (conn != null) {
          conn.disconnect();
       }
     }
    return rs;
  }

  //Change map type to request parameter type
  public static String urlencode(Map<String,String> data) {
       StringBuilder sb = new StringBuilder();
       for (Map.Entry i : data.entrySet()) {
           try {
              sb.append(i.getKey()).append("=").append(URLEncoder.encode(i.getValue()+"","UTF-8")).append("&");
           } catch (UnsupportedEncodingException e) {
              e.printStackTrace();
           }
       }
       return sb.toString();
  }

}

Posted by MNSarahG on Thu, 10 Oct 2019 17:11:21 -0700