ASP article in the random insertion of Web site Copyright text Implementation Code _ Application Tips

Source: Internet
Author: User
Tags chr
Of course, if you have a picture in your website article, then please remember to play on their own logo, and this logo should not be fixed in some of these pictures in a corner, must randomly appear in the picture anywhere, do the shadowy, let the collector feeling: The other site is really unpredictable, difficult ah ...

Cut to the chase. How can we randomly insert the copyright text in our own article? Last night spent a bit of time writing a simple random insertion of random text code, ASP version of:


"= = = Random generated interference literal function start = =
"= = = Random generated interference text function one = =
function Rndk ()
Dim s,s1,n,n1
"Randomly insert your website copyright text, multiple to | split
s= "cloud-dwelling Community | script: Http://www.jb51.net. |http://www.jb51.net. | Jb51. NET. |<font style=display:none>http://www.kanshule.com</font>|<span style= "Display:none" >< A href=http://www.jb51.net> script </a></span> "
S1=split (S, "|")
Randomize
N=int (UBound (S1)-LBound (S1) + 1) * Rnd + lbound (S1))
Randomize
N1=int ((10-1 + 1) * Rnd + 1)
If n1<=3 then ' 30% probability appears
RNDK=S1 (N)
Else
Rndk= ""
End If
End Function
"= = = randomly generated interference literal function two = =
function Transtr (str) ' calls the transform
Dim str1,i,k
k= "<p></p>" Segmentation keywords
Str1=split (Str,k)
For I=lbound (STR1) To UBound (STR1)
TRANSTR=TRANSTR&AMP;STR1 (i) &rndk () &k
Next
End Function
"= = = randomly generated interference literal function end = =

In the specific call, such as our content field contents, with the above function to convert the OK, like transtr (content) so on the line. I take the segmentation keyword is the paragraph before the end of the <p></p&gt, you can also change to other such as <br> line, if your field has not been transformed by UBB, then the line return symbol for CHR (Ten) & CHR (10), Split the keyword to change it on it.

Although we can not say that the content of the site is original, but also a piece of us painstakingly sorted out Ah, others through the program can be a few hours of your efforts to a few months or even years to steal the past, put it on who is not comfortable ah.

So, floating easy to release such a random insertion of copyright code, hoping to curb the arrogance of some of these collectors.

If you have a better way, you are welcome to leave your comments.
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.