Use shell to determine the pv and alexa rankings of websites

Source: Internet
Author: User
This is a script written to a friend. It is used for cdn and is often used for attacks. However, the domain name cannot be blocked once an attack is encountered. We can choose to make a decision. This is the value of alexa in php. & lt ;? Php $ yuming = $ argv [1]; // obtain the alaxe ranking functiongetAlexaRank ($ domain = "www.cninfo360.com") {$ line = ""; $ data = "";

This is a script written to a friend. It is used for cdn and is often used for attacks. However, the domain name cannot be blocked once an attack is encountered. We can choose to make a decision.


This is the value of alexa in php.

 


This is used to obtain the pv value.

 


Shell judgment


#!/bin/bashdigstatus=`dig $1 ns|grep IN.*NS.*.$|grep -E "ns1.appleidc.com|ns2.appleidc.com"|wc -l`[ $digstatus -eq 0 ] && exitpaiming=`php alexa $1`if [ $paiming -lt 1000 ]thenecho highelseecho no highfipv=`php pv $1`echo "$1 pv num is $pv"

After determining what to do, you can write it yourself. A friend executes a post form and adds a status value to the domain name in the database.

This article is from "Fengyun, it's her ." Blog, please be sure to keep this source http://rfyiamcool.blog.51cto.com/1030776/1087560


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.