script for Google PR written in ASP .NET


Does anybody have a script for Google PR written in ASP .NET? I seen quite a few in PHP but i m looking for a script which is written in ASP .NET

I also tried many times to find one but find yet

You can use this php script in asp.net also.

you can call php script from asp & asp.net

try this

Code:

<%
Const GOOGLE_MAGIC = &HE6359A60

Function sl(ByVal x, ByVal n)
If n = 0 Then
sl = x
Else
Dim k
k = CLng(2 ^ (32 - n - 1))
Dim d
d = x And (k - 1)
Dim c
c = d * CLng(2 ^ n)
If x And k Then
c = c Or &H80000000
End If
sl = c
End If
End Function

Function sr(ByVal x, ByVal n)
If n = 0 Then
sr = x
Else
Dim y
y = x And &H7FFFFFFF
Dim z
If n = 32 - 1 Then
z = 0
Else
z = y  CLng(2 ^ n)
End If
If y <> x Then
z = z Or CLng(2 ^ (32 - n - 1))
End If
sr = z
End If
End Function

Function zeroFill(ByVal a, ByVal b)
Dim x
if (&H80000000 AND a) then
x = sr(a,1)
x = x AND (NOT &H80000000)
x = x OR &H40000000
x = sr(x,b-1)
else
x = sr(a,b)
end if
zeroFill = x
End Function

Private Function uadd(ByVal L1, ByVal L2)
Dim L11, L12, L21, L22, L31, L32
L11 = L1 And &HFFFFFF
L12 = (L1 And &H7F000000)  &H1000000
If L1 < 0 Then L12 = L12 Or &H80
L21 = L2 And &HFFFFFF
L22 = (L2 And &H7F000000)  &H1000000
If L2 < 0 Then L22 = L22 Or &H80
L32 = L12 + L22
L31 = L11 + L21
If (L31 And &H1000000) Then L32 = L32 + 1
uadd = (L31 And &HFFFFFF) + (L32 And &H7F) * &H1000000
If L32 And &H80 Then uadd = uadd Or &H80000000
End Function

Private Function usub(ByVal L1, ByVal L2)
Dim L11, L12, L21, L22, L31, L32
L11 = L1 And &HFFFFFF
L12 = (L1 And &H7F000000)  &H1000000
If L1 < 0 Then L12 = L12 Or &H80
L21 = L2 And &HFFFFFF
L22 = (L2 And &H7F000000)  &H1000000
If L2 < 0 Then L22 = L22 Or &H80
L32 = L12 - L22
L31 = L11 - L21
If L31 < 0 Then
L32 = L32 - 1
L31 = L31 + &H1000000
End If
usub = L31 + (L32 And &H7F) * &H1000000
If L32 And &H80 Then usub = usub Or &H80000000
End Function

Function mix(ByVal ia, ByVal ib, ByVal ic)
Dim a, b, c
a = ia
b = ib
c = ic

a = usub(a,b)
a = usub(a,c)
a = a XOR zeroFill(c,13)

b = usub(b,c)
b = usub(b,a)
b = b XOR sl(a,8)

c = usub(c,a)
c = usub(c,b)
c = c XOR zeroFill(b,13)

a = usub(a,b)
a = usub(a,c)
a = a XOR zeroFill(c,12)

b = usub(b,c)
b = usub(b,a)
b = b XOR sl(a,16)

c = usub(c,a)
c = usub(c,b)
c = c XOR zeroFill(b,5)

a = usub(a,b)
a = usub(a,c)
a = a XOR zeroFill(c,3)

b = usub(b,c)
b = usub(b,a)
b = b XOR sl(a,10)

c = usub(c,a)
c = usub(c,b)
c = c XOR zeroFill(b,15)

Dim ret(3)

ret(0) = a
ret(1) = b
ret(2) = c

mix = ret
End Function

Function gc(ByVal s, ByVal i)
gc = Asc(Mid(s,i+1,1))
End Function

function GoogleCH(ByVal sURL)
Dim iLength, a, b, c, k, iLen, m
iLength = Len(sURL)

a = &H9E3779B9
b = &H9E3779B9
c = GOOGLE_MAGIC
k = 0

iLen = iLength
do while iLen >= 12
a = uadd(a,(uadd(gc(sURL,k+0),uadd(sl(gc(sURL,k+1),8),uadd(sl(gc(sURL,k+2),16),sl(gc(sURL,k+3),24))))))
b = uadd(b,(uadd(gc(sURL,k+4),uadd(sl(gc(sURL,k+5),8),uadd(sl(gc(sURL,k+6),16),sl(gc(sURL,k+7),24))))))
c = uadd(c,(uadd(gc(sURL,k+8),uadd(sl(gc(sURL,k+9),8),uadd(sl(gc(sURL,k+10),16),sl(gc(sURL,k+11),24))))))

m = mix(a,b,c)

a = m(0)
b = m(1)
c = m(2)

k = k + 12

iLen = iLen - 12
loop

c = uadd(c,iLength)

select case iLen ' all the case statements fall through
case 11
c = uadd(c,sl(gc(sURL,k+10),24))
c = uadd(c,sl(gc(sURL,k+9),16))
c = uadd(c,sl(gc(sURL,k+8),8))
b = uadd(b,sl(gc(sURL,k+7),24))
b = uadd(b,sl(gc(sURL,k+6),16))
b = uadd(b,sl(gc(sURL,k+5),8))
b = uadd(b,gc(sURL,k+4))
a = uadd(a,sl(gc(sURL,k+3),24))
a = uadd(a,sl(gc(sURL,k+2),16))
a = uadd(a,sl(gc(sURL,k+1),8))
a = uadd(a,gc(sURL,k+0))
case 10
c = uadd(c,sl(gc(sURL,k+9),16))
c = uadd(c,sl(gc(sURL,k+8),8))
b = uadd(b,sl(gc(sURL,k+7),24))
b = uadd(b,sl(gc(sURL,k+6),16))
b = uadd(b,sl(gc(sURL,k+5),8))
b = uadd(b,gc(sURL,k+4))
a = uadd(a,sl(gc(sURL,k+3),24))
a = uadd(a,sl(gc(sURL,k+2),16))
a = uadd(a,sl(gc(sURL,k+1),8))
a = uadd(a,gc(sURL,k+0))
case 9
c = uadd(c,sl(gc(sURL,k+8),8))
b = uadd(b,sl(gc(sURL,k+7),24))
b = uadd(b,sl(gc(sURL,k+6),16))
b = uadd(b,sl(gc(sURL,k+5),8))
b = uadd(b,gc(sURL,k+4))
a = uadd(a,sl(gc(sURL,k+3),24))
a = uadd(a,sl(gc(sURL,k+2),16))
a = uadd(a,sl(gc(sURL,k+1),8))
a = uadd(a,gc(sURL,k+0))
case 8
b = uadd(b,sl(gc(sURL,k+7),24))
b = uadd(b,sl(gc(sURL,k+6),16))
b = uadd(b,sl(gc(sURL,k+5),8))
b = uadd(b,gc(sURL,k+4))
a = uadd(a,sl(gc(sURL,k+3),24))
a = uadd(a,sl(gc(sURL,k+2),16))
a = uadd(a,sl(gc(sURL,k+1),8))
a = uadd(a,gc(sURL,k+0))
case 7
b = uadd(b,sl(gc(sURL,k+6),16))
b = uadd(b,sl(gc(sURL,k+5),8))
b = uadd(b,gc(sURL,k+4))
a = uadd(a,sl(gc(sURL,k+3),24))
a = uadd(a,sl(gc(sURL,k+2),16))
a = uadd(a,sl(gc(sURL,k+1),8))
a = uadd(a,gc(sURL,k+0))
case 6
b = uadd(b,sl(gc(sURL,k+5),8))
b = uadd(b,gc(sURL,k+4))
a = uadd(a,sl(gc(sURL,k+3),24))
a = uadd(a,sl(gc(sURL,k+2),16))
a = uadd(a,sl(gc(sURL,k+1),8))
a = uadd(a,gc(sURL,k+0))
case 5
b = uadd(b,gc(sURL,k+4))
a = uadd(a,sl(gc(sURL,k+3),24))
a = uadd(a,sl(gc(sURL,k+2),16))
a = uadd(a,sl(gc(sURL,k+1),8))
a = uadd(a,gc(sURL,k+0))
case 4
a = uadd(a,sl(gc(sURL,k+3),24))
a = uadd(a,sl(gc(sURL,k+2),16))
a = uadd(a,sl(gc(sURL,k+1),8))
a = uadd(a,gc(sURL,k+0))
case 3
a = uadd(a,sl(gc(sURL,k+2),16))
a = uadd(a,sl(gc(sURL,k+1),8))
a = uadd(a,gc(sURL,k+0))
case 2
a = uadd(a,sl(gc(sURL,k+1),8))
a = uadd(a,gc(sURL,k+0))
case 1
a = uadd(a,gc(sURL,k+0))
End Select

m = mix(a,b,c)

GoogleCH = m(2)
End Function

Function CalculateChecksum(sURL)
CalculateChecksum = "6" & CStr(GoogleCH("info:" & sURL) AND &H7FFFFFFF)
End Function

Function GetRank(sURL)
response.redirect "http://www.google.com/search?client=navclient-auto&ch=" & sURL & "&features=Rank&q=" & "info:" & sURL
End Function

GetRank("www.google.com")


add new features that are not implemented in H-Sphere


I have a web hosting account with H-Sphere control panel. Can I add new features that are not implemented in H-Sphere?

We provide open API to a few modules that can be used to add your own classes. For example, you can create your own CC processor by subclassing the Merchant gateway class.

new features in H-Sphere


Can I add new features that are not implemented in H-Sphere?

We provide open API to a few modules that can be used to add your own classes. For example, you can create your own CC processor by subclassing the Merchant gateway class.

How can you help me if I choose to add a product which is not supported by H-Sphere?
If you choose to add support to any of unsupported products, such as servlets or JSP, you would have to do it by yourself at your own risk. We can tell you whether or not this installation will mess with H-Sphere if you tell us what this installation will take in your specific case. This means, we would need from you a step-by-step plan of what exactly you are going to do to your system in respect to this installation.

convert PHP code in ASP


Hi,
Can someone please give me the ASP of this PHP code?

<?php
echo file_get_contents($myv);
?>

It gets the entire content of a webpage and displays it on the page where the code runs. Supports http:// also.

I think I will first have to set the variable “myv” using:

dim myv=”http://site.com?id=33&#8243;;
Is that right?

Thanks for helping.

Try this

Code:

<%
Function getUrl(urltogo)
GotothisURL = urltogo
on error resume next
Set GetConnection = CreateObject("Microsoft.XMLHTTP")
on error resume next
GetConnection.Open "get", GotothisURL, False
GetConnection.Send
ResponsePage = GetConnection.responseText
Set GetConnection = Nothing
ResponsePage = removeChars(ResponsePage)
if err.description = "" then
getUrl = ResponsePage
else
getUrl = "News not found"
end if
end function

full_content = getUrl("http://www.mobile.am")
small_content = getUrl("http://www.mobile.am")

if full_content = "" then full_content = "<H3>Not found, invalid URL</h3>" end if
if small_content = "" then small_content = "<H3>Not found, invalid URL</h3>" end if

%>

What Operating Systems does [B]H-Sphere [/B]support?


What Operating Systems does H-Sphere support?

Operating System – CP, Web, Mail, DNS, SQL
RedHat Linux 7.2, 7.3 – Web, Mail, DNS, SQL;
RedHat Enterprise Linux up to v.3.0 (ES/WS/AS) – – Web, Mail, DNS, SQL;
FreeBSD 4.8 and 4.9 – Web, Mail, DNS, SQL;
Windows 2000 and 2003 – Web.

What web server does H-Sphere use?

H-Sphere uses Apache on Unix platforms, and IIS on Win2000 platform.

What servlet runner does the control panel use?

H-Sphere 2.3.x and lower runs on JServ. H-Sphere 2.4 and higher runs on Tomcat.

Which databases does H-Sphere work with?

H-Sphere has been tested on PostgreSQL, Oracle, and MS SQL. We are planning to add support for Informix. The recommended server is PostgreSQL.

version of ASP.NET


How can I find out what version of ASP.NET is running on my computer?

try this

Code:

<%
Response.Write("The .NET version is " & System.Environment.Version.ToString() )
%>

create an e-mail account


In H-Sphere can the domain manager create an e-mail account for his employee?

Yes. The webmail interface is available outside the control panel, so the employee can independently go to the URL of the mail server and log straight into his email account.

Can I hide parts of control panel?

Some of the parts are hidden automatically, if a user does not have access to them. The rest can be hidden by template customization and menu customization.

Third party scripts


Can I integrate third party scripts like guest books, counter, polls, form-to-email facilities, etc in H-Sphere control panel?

Yes, you can modify the templates to provide links to your own scripts. H-Sphere configures servers in the way any other good sys-admin would do it.