Recently, ESET add my domain name to the black-list of their database. You can’t open my site and been warned my site is not safe if your PC is running the ESS or EAV. Why Eset block my site?The answer is obvious. That is reason that you come here. I promise that my site is pure, no virus, no spyware, no Trojan, no pop ads. You can test my word through intalling Kaspersky or other Antivirus Software. If you want open my site and take latest escalation ID & Activation Code, close your ESET software(disable antivirus and antispyware protection function temporarily) or by proxy or virtual machinor. You can also feed the RSS source http://feed.loserblog.cn.

Archive

Archive for the ‘Programm’ Category

The DNS service work principle

May 17th, 2008 Loser No comments

DNS into Client and Server, Client asked to play the role, also asked Server is a Domain Name, and Server must answer this Domain Name the real IP address. And the local DNS will first check their database. If the database does not own, will be on to the DNS set up by the DNS asked, and so get an answer, depositors will receive the answer, and answer customers.

DNS server will be authorized under a different area (Zone), which records the domain name of the information, including information under the domain of the domain name and host name.

In each name server has a cache buffer zone (Cache), the cache buffer zone is the main purpose of the name servers out for the names and IP addresses the relative record in the cache buffer zone This present time there is another client, server federation boost for the same name, the server will not need the boost to the search for other hosts, directly from the buffer zone can be found in该笔name record data, returned to the customer – To speed up the name of the client for speed. For example:

When the DNS client to the designated DNS server on the Internet for a particular host name DNS server in the database will find the name specified by the user and if not, the server will be in their own cache buffer zone Query whether该笔records, if found该笔name records, from the DNS server directly to the corresponding IP address back to the client, if the name servers in the data recorded Chabu Dao and also in the cache buffer zone No, the server will be the first to the other name server query to the name. For example:

DNS client to the designated DNS server on the Internet for a console title, when the DNS server can not find records of the information specified by the user's name, will shift the server's cache buffer zone to find whether the information, When the cache buffer zone can not be found, the closest to the name server to request help locate the name of the IP address, in another server have the same action query, when the enquiry will be back to the original request for The server, the DNS server in the receiving DNS server to another after the results of inquiries, the first query to the host name and IP address recorded in the corresponding cache buffer zone, the last in the enquiry will be to restore to the results Client.

Example

We illustrate, suppose we have to query on the Internet for a name www.test.com.cn.

"Step 1" in the DNS client (Reslover) typing a query host to the directive, such as:

c: \ ping www.test.com.cn

pinging www.test.com.cn [192.72.80.36 – with 32bytes of data

reply from 192.72.80.36 bytes time <10ms ttl 253

"Step 2" was designated DNS server for the first part of the domain name of the host, if found to host name does not belong to the domain area, to be followed by another cache buffer zone for the record, investigation Does any of this name.

"Step 3" Enquiries revealed that no buffer zone in this record, will have a root domain of one server, sent to find www.test.com.cn said the Request.

Categories: Programm Tags:

The ASP uses Python

May 17th, 2008 Loser No comments

<%@ LANGUAGE = Python %>

Chased vbscript and jscriptT, use Python script.True alternative.

Use Python script in the ASP:
1.Install good Active Python first, it from took win 32 expand, province oneself packed;
2.Explain according to the Active supplementary text file, find out pyscript.py in% the Python_home%/ the 32 comexts/axscript/client/catalogue of the lib/site_packages/win, double click to circulate it, this step installs a Python explanation engine in the IIS;
3.Lately set up an asp document, the document head use<%@ LANGUAGE= Python%>, tell the IIS this Python script of the document adoption;
4.Leave of be press the python phrasing plait distance.
5.Example:Visit Access:
<%@ LANGUAGE = Python %>
<!–#include file="pyDB4Jet.asp"–>
<%
#Establish the solid example of the data interview
myax=Cdb4Jet()

Adjust to use the data interview search method, return to a result to endow with to the rs
rs=myax.query('select * from [user]')

#Following code for note uses to a time Li to print to take back to the word segment of data
#flds_dict={}
#for x in range(rs.Fields.Count):
# flds_dict[x]=rs.Fields.Item(x).Name
# Response.write(flds_dict[x] + "<br>")

# Time the Li take back of data
while not myax.rs.EOF:
#Output the third word segment value which goes each time(word segment ordinal number from 0 beginning)
Response.write(rs.Fields[2].Value+"<BR>")
#Move next
myax.rs.MoveNext()

#Re- move back the first
myax.rs.MoveFirst()

#Again time Li
while not myax.rs.EOF:
#The second word segment value that the exportation goes each time
Response.write(rs.Fields[1].Value+"<br>")
#Move next
myax.rs.MoveNext()
%>
More sorry is I don't know while visitting Recordset in the Python how choice of words a , will choice of words an ordinal number.
Moreover a wants to notice of is visit access of form have to get up with"[]" Gua.

6.Last and convenient access interview for arrive:
<%
# -*-coding:UTF-8-*- #This tells that the python uses codings UTF-8s
#=================================================================
# NAME: pyDB4Jet
# AUTHOR: benyur
# DATE : 2004-12-30
# COMMENT: The Python ACCESS visits a mold piece
#=================================================================

#Duct into the win 32 com mold piece
import win32com

#The data interview define
class Cdb4Jet:

#Structure function, the python structure function differs from C++/C#or Java structure function, at carry out__init__ method, the solid example has already exist
def __init__(self):

#The win 32 com.client.Dispatches useds for establishing COM object
#Establish ADO the conjunction object of the Connection data
self.conn=win32com.client.Dispatch(r'ADODB.Connection')

#The interview conjunction of the DSN conservancy database string
self.DSN='PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=E:\wwwroot\csip\#news.mdb;'

#Open a database
self.conn.Open(self.DSN)

#The Recordset data which establishes ADO gathers object
self.rs=win32com.client.Dispatch(r'ADODB.Recordset')

#The definition searches a method
def query(self,sql):
#Carry out the Open method of Recordset object, the data gathers from the database resumption
self.rs.Open(sql,self.conn,1,1)

#Returning to the data gather to adjust to use
return self.rs

#The definition doesn't  search a method
def execute(self,sql):
#Directly adjust the performance sql language sentence of the execute method of use the Connection object, and return the performance to adjust to use as a result
return self.conn.execute(sql)
%>

Categories: Programm Tags:

The ASP get the frount number of the website Alexa

May 16th, 2008 Loser No comments

There are a lot of Alexas placings that the article introduction how automatically grabs at a website on the network, but careful one the datas seen discover to grab at(Alexa placings

Number)was joined a lot of interference chemical elements by the Alexa, if just wanted to show at a data(the number of Alexa placings) a page to pour to without problem

, If want logarithms according to carry on a processing to for example carry on two placings numbers of websites more and perhaps website placings the number deposit a database to provide to adjust in the days to come

Use, then want to carry on an appropriate processing to the data for grab at.

The following is oneself combine other net friends provide of code, acquire the method of clean number after carry on the processing to the data for grab at.Core

Function code is as follows:

Explain:Have a little the net friend has already passed other ways to carry out this kind of function, just didn't announce a method, or the method for announce I don't understand(oneself don't understand php etc. an another plait distance language), so oneself dedicate here ugly.

<%


'// The search page of placings in the alexa world is:http://www.alexa.com/data/details/traffic_details?q=&Url=



'// The following function grab at a data of imply the interference chemical element and pass function logarithms according to carry on a processing, acquire clean number of Alexa placings

Function alexa(str)

url="http://www.alexa.com/data/details/traffic_details?q=&url="&str
strs=str

If IsObjInstalled("AspHTTP.Conn")=true Then
str= getaspHTTPPage(url)
else
str= getHTTPPage(url)
End if


if str="" then
Call Error()
else
str_=str
str1=""
set reg=new Regexp
reg.Multiline=True
reg.Global=True
reg.IgnoreCase=true
str_top="<!–Did you know"
str_bottom="</span>"
reg.Pattern=""&str_top&"((.|\n)*?)"&str_bottom&""
Set matches = reg.execute(str_)
str1=""
For Each match1 in matches
str1=str1&match1.Value&"***"
Next
Set matches = Nothing
Set reg = Nothing

IF str1 <> "" Then
str1 = Replace(str1,"<!–Did you know? Alexa offers this data programmatically.

Visit http://webservices.amazon.com/ for more information about the Alexa Web Information

Service.–>","")
str1 = Replace(str1,"</span>","")
Str_11=split(str1,"<div class=""borderBottom""></div>")
str1 = Str_11(0)
Str_11 = split(str1,"***")
str1_Pan = Str_11(0)
End If

set reg=new Regexp
reg.Multiline=True
reg.Global=True
reg.IgnoreCase=true
str_top="<td class=""traffic"">"
str_bottom="</td>"
reg.Pattern=""&str_top&"((.|\n)*?)"&str_bottom&""
Set matches = reg.execute(str_)
str1=""
For Each match1 in matches
str1=str1&match1.Value&"***"
Next
Set matches = Nothing
Set reg = Nothing

IF str1 <> "" Then
Str_11=split(str1,"***")

End If
End if

'************************************
'************************************
alexa=getcorrectvalue(str1_Pan)
'************************************
'************************************

End Function





'************************************
'This function function cleans an interference chemical element
'************************************
function getcorrectvalue(source)
source="|"+source+"|"

while InStr(source,"<")>0
thestart = InStr(source, "<")
theend = InStr(source, ">")
source = mid(source,1,thestart-1)+right(source,(len(source)-theend))
wend

source=replace(source,"|","")
source=replace(source,",","")



Author: 221.217.114.*2006-5-1016:17 replies this speak

——————————————————————————–

2 obtain the method of the placings number of the website Alexa
getcorrectvalue=source
end function


'************************************
'************************************





'// <summary>
'// Adoption Microsoft.the XMLHTTP module collect a data
'// </summary>
Function getHTTPPage(url)
on error resume next
dim http
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
if Http.readystate<>4 then
exit function
end if
getHTTPPage=bytes2BSTR(Http.responseBody)
set http=nothing
if err.number<>0 then err.Clear
End function

'// <summary>
'// Adoption ADODB.the Stream processing collect of data, turn the presentable to the document of binary system originally character list
'// </summary>
Function Bytes2bStr(vin)
Dim BytesStream,StringReturn
Set BytesStream = Server.CreateObject("ADODB.Stream")
BytesStream.Type = 2
BytesStream.Open
BytesStream.WriteText vin
BytesStream.Position = 0
BytesStream.Charset = "GB2312"
BytesStream.Position = 2
StringReturn =BytesStream.ReadText
BytesStream.close
Set BytesStream = Nothing
Bytes2bStr = StringReturn
End Function


'// <summary>
'// Adoption AspHTTP.the Conn module collect a data
'// </summary>
Function getaspHTTPPage(url)
if url="" then
exit function
end if
Set HttpObj = Server.CreateObject("AspHTTP.Conn")

'Establish a proxy server, the customer who gets to the Internet through an agency needs to establish this options
If ProxyIP=1 Then
HttpObj.Proxy="192.168.5.254:808"
end if

HTTPObj.TimeOut = 45
HttpObj.Url = url
HttpObj.RequestMethod = "GET"
getaspHTTPPage = HttpObj.GetURL
set HttpObj=nothing
End function




'//<summary>
'//Check module, adopt xmlhttp to grab at a web page or an AspHTTP
'//</summary>

Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
Set xTestObj = Server.CreateObject(strClassString)

If 0 = Err Then
If AspHttpOpen=1 Then
IsObjInstalled = True
'"Current module ASPHTTP" of the Response.write
Else
IsObjInstalled = False
'"Current module XMLHTTP" of the Response.write
End If
Else
IsObjInstalled = False
'"Current module XMLHTTP" of the Response.write
End If

Set xTestObj = Nothing
Err = 0

End Function

Sub Error()
Response.write"<BR> could not grab at data - may be because of the network reason can't visit a station to order<BR><a

Href=javascript:location.reload();>heavy try</a>"
response.end
End Sub


%>


Adjust to use a method:


<%
response.write alexa("http://blog.sina.com.cn/u/1086421675")
%>

<%=alexa("http://blog.sina.com.cn/u/1086421675")%>

Categories: Programm Tags:

The asp burglar core code

May 16th, 2008 Loser No comments

<%
Dim SenFe_Code
Dim Http : Set Http = Server.CreateObject("Msxml2.ServerXMLHTTP")
With Http
.The Open"POST", "Web address", False
."Referer" of the SetRequestHeader, "page source"
."Cookie" of the SetRequestHeader, "Cookie contents"
."Accept-Language" of the SetRequestHeader, "language"
."Content-Length" of the SetRequestHeader, "want to hand over of data length"
."Content-Type" of the SetRequestHeader, "accept a data type"
."User-Agent" of the SetRequestHeader, "browser type"
."Accept-Encoding" of the SetRequestHeader, "the gzip compress"
."Accept" of the SetRequestHeader, "text file type"
.The Send"want to hand over of parameter"
If .ReadyState = 4 And .Status = 200 Then
'The contents return
'SenFe_Code = .ResponseBody
SenFe_Code = .ResponseText
'SenFe_Code = .getResponseHeader("Set-Cookie")
'SenFe_Code = .getAllResponseHeaders()
Else
SenFe_Code="mistake"
End If
End With
%>

Categories: Programm Tags:

The usage xmlhttp obtains a distant content in asp

May 16th, 2008 Loser No comments

What is the XmlHttp ?
The most in general use definition is:The XmlHttp is a set of a set of API that can pass http agreement transmission or receive XML and other datas in the Javascript, VbScript, the script language of Jscript etc..XmlHttp the biggest use is parts of contentses that can renew a web page but don'ts need to break the whole page.
The explanation from MSDN:The XmlHttp provides the customer with the agreement which carries together a http server communication.The customer carries and can pass XmlHttp object(MSXML2.XMLHTTP.3.0) send out to request toward the http server and use the object model of the Microsoft XML text file
Microsoft? The Object Model(DOM) of the XML Document processing respond.

The absolute majority browsers in nowadays all increased to XmlHttp support, the usage ActiveXObject in IE's method established XmlHttp object, other browsers such as:The Firefox, Opera etc. passes window.XMLHttpRequest to establish xmlhttp object.
The -----------------------------------------

XmlHttp the biggest use is parts of contentses that can renew a web page but don'ts need to break the whole page.
So, the xmlhttp is an ajax core;It can pass to combine a javascript kimono's duty to carry script like asp, produce a virtual browser;Thus another with the top of the server of page perhaps moreover a contents on server hand over with each other.Transmission with receive of the contents include but not only only include a http head, the html data, cookies, form and list data etc..Script can with logarithms according to carry on a modification sorting, obtain thus the valid part of information not only only can immediately display on the browser, but also can be a document to keep perhaps write in a database.

The underneath is a most simple example:

Set objXMLHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")'establish xmlhttp object
'Set objXmlHttp= Server.CreateObject("Microsoft.XMLHTTP")'this method be a little bit ancient a little bit older
objXmlHttp.open "GET","http://www.yahoo.com",false    ' Use similar in http agreement of the get method open yahoo international station
ObjXmlHttp.send()'sent out a http claim
Response.write(objXmlHttp.responseText)'the exportation return of text originally
Set obiXMLHTTP=nothing'log off object

Categories: Programm Tags:

What is a DHTML:Dynamic state HTML

May 11th, 2008 Loser No comments

Describe with general publication of contrary, dynamic state HTML:The DHTML isn't only a kind of special technique, calculator language or function to gather, but the way which synthesizes a few different technique interactions.The dynamic state HTML(DHTML) can let you use normal regulations DHTML, script document, text file object mold piece, absolute fixed position the technique, dynamic state style, multi-media filter and various other technique dynamic state change HTML to show on the screen text originally with the way of picture.                     -《The L practical guidebook of the dynamic state HTM》Microsoft
The most in common use application include:Circulate various script procedure which carries in the browser.

The traditional HTML is static, be it to be add to carry to the back of the browser, it be like an appearance, how see can't take place variety, either, but dynamic state HTML then mean a Web page to have already respond to to the customer, namely, the dynamic state HTML can automatically change.

First, the DHTML needs a kind of method to check text file, it can follow each chemical element on the page, from minimum of<H 6> headlines and<HR>level surveyor's rod, get to form and list in all chemical elements, say from the essence, whenever the page is add to carry and the browser starts to build up a database and each marking becomes 1 in the database to record.Secondly, the DHTML still needs a kind of method to control in the middle of a text file all demands to control of chemical element, can pass some script languages to complete, for example javascript or vbscript, the script language will imbed the related information to each chemical element on the page, and check their constitution value, make of the occurrence prepare to think of variety.

Chien but speech it, DHTML is not relevant face to a server of script, javaapplet or animation GIF portrait, all of these operations oneself can complete, in addition to changing a page contents, don't need to visit a server.After page download, whatever time, the DHTMLs all can handle page chemical element, the change page layout of printed sheet, contents and position.Also continuously provide the result to a customer.

The DHTML doesn't have united standard currently.

Categories: Programm Tags:

A beautiful advertisement picture rotates support

May 11th, 2008 Loser No comments

<script language="javascript" type="text/javascript">
<!–
var bannerAD = new Array();
var bannerADlink = new Array();
var adNum = 0;
bannerAD[0] = "http://img.kingsoft.com/publish/jx/images/2006/04/04/500-100.gif";
bannerADlink[0] = "http://jx.xoyo.com/zt/2006/03/wldh/index.shtml";
bannerAD[1] = "http://img.kingsoft.com/publish/jx/images/2006/04/17/500-100.jpg";
bannerADlink[1] = "http://jx.xoyo.com/zx/news/2006/04/14/80849.shtml";
var preloadedimages = new Array();
for (i=0;i<bannerAD.length;i++) {
preloadedimages[i] = new Image();
preloadedimages[i].src = bannerAD[i];
}
function setTransition() {
if (document.all) {
bannerADrotator.filters.revealTrans.Transition = Math.floor(Math.random() * 23);
bannerADrotator.filters.revealTrans.apply();
}
}
function playTransition() {
if (document.all)
bannerADrotator.filters.revealTrans.play();
}
function nextAd() {
if (adNum < bannerAD.length – 1) adNum++;
else adNum = 0;
setTransition();
document.images.bannerADrotator.src = bannerAD[adNum];
playTransition();
theTimer = setTimeout("nextAd()", 6000);
}
function jump2url() {
jumpUrl = bannerADlink[adNum];
jumpTarget = '_blank';
if (jumpUrl != '') {
if (jumpTarget != '') window.open(jumpUrl, jumpTarget);
else location.href = jumpUrl;
}
}
function displayStatusMsg() {
status = bannerADlink[adNum];
document.returnValue = true;
}
//–>
</script>
<a onMouseOver="displayStatusMsg();return document.returnValue" href="javascript:jump2url()"><img src="javascript:nextAd()" name="bannerADrotator" border="0" id="bannerADrotator" style="FILTER: revealTrans(duration=2,transition=20)" /></a>
Under the Firefox can rotate an advertisement, but the conversion filters the mirror as IE privately owned, so the special effect is under the IE just it is thus clear that.

Categories: Programm Tags:

Check to seek inside page

May 11th, 2008 Loser No comments

function findInPage(str)
{
var txt, i, found,n = 0;
if (str == "")
{
  return false;
}
txt = document.body.createTextRange();
for (i = 0; i <= n && (found = txt.findText(str)) != false; i++)
{
  txt.moveStart("character", 1);
  txt.moveEnd("textedit");
}
if (found)
{
  txt.moveStart("character", -1);
  txt.findText(str);
  txt.select();
  txt.scrollIntoView();
  n++;  
}
else
{
  if (n > 0)
  {
   n = 0;
   findInPage(str);
  }
  else
  {
   alert(str + "…            The writing nonentity that you have to seek.\N\the n please try the key word in the importation page to again check to seek!");
  }
}
return false;
}

Categories: Programm Tags:

The javascript changes the form of word

May 8th, 2008 Loser No comments

The size of a js, definition container and form of written, carry out web page container and form of written of from the definition size.

<script type="text/javascript">
<!–
function scaleWidth()
{
var optimalLineLength = "35em";
var extraAccounting = "12em";
var minimumTextHeight = "10px";
var windowWidth = document.body.clientWidth;
var optimalSize = windowWidth / (parseInt(optimalLineLength) + parseInt(extraAccounting));

if (optimalSize >= parseInt(minimumTextHeight))
{
document.body.style.fontSize = optimalSize + "px";
}
else
{
document.body.style.fontSize = parseInt(minimumTextHeight) + "px";
}

return true;
}

function textSize(size)
{
var theContainer = document.getElementById("widthContainer");
var increment = 0.1
var currentSize = parseFloat(document.getElementById("widthContainer").style.fontSize);

if (!currentSize)
{
currentSize = 0.8;
}

if (size == "smaller")
{
theContainer.style.fontSize = (currentSize – increment) + "em";
}
else
{
theContainer.style.fontSize = (currentSize + increment) + "em";
}

return true;
}
–>
</script>

Categories: Programm Tags:

The javascript checks to seek a phrase sentence

May 8th, 2008 Loser No comments

//Find out a two pieces text to originally win a same single phrase short sentence
<SCRIPT LANGUAGE="JavaScript">
function meizz(a, b, n)
{
var c=a.length>b.length?b:a;
if(b==c) b=a; a=c; //Do some circulations less
if(!n) n=1;
var mm = new Array();
for(var i=0; i<a.length; i++)
{
for(var j=i+n; j<=a.length; j++)
{
var s = a.substring(i, j);
if(b.indexOf(s)==-1)
{
if(s.length>n)
{
mm[mm.length] = a.substring(i, j-1);
i = j-2;
}
break;
}
else
{
if(j==a.length)
{
mm[mm.length]=s;
}
}
}

}
return mm.Unique().join(","); //The repeated item cleaned severals inside
//return mm.join(",");
}

Array.prototype.Unique = function()
{
var a = {}; for(var i=0; i<this.length; i++)
{
if(typeof a[this[i]] == "undefined")
a[this[i]] = 1;
}
this.length = 0;
for(var i in a)
this[this.length] = i;
return this;
};


Var a="we are the best";
Var b="we aren't the most bad";
//Result get"we"&"BE most"
Alert("return of result:"+ meizz(a, b, 2));
</SCRIPT>

Categories: Programm Tags:
  • Partner links