Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7545165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:51:29+00:00 2026-05-30T08:51:29+00:00

I am using the code below but it is giving time out error. Though

  • 0

I am using the code below but it is giving time out error. Though my IP is not blocked and i am able to check via firefox addon searchstatus. The code below i am using seems like outdated and not decent. So my question is how can i get url page rank with c# 4.0

        private const UInt32 GOOGLE_MAGIC = 0xE6359A60;

    private static void _mix(ref UInt32 a, ref UInt32 b, ref UInt32 c)
    {
        a -= b; a -= c; a ^= c >> 13;
        b -= c; b -= a; b ^= a << 8;
        c -= a; c -= b; c ^= b >> 13;
        a -= b; a -= c; a ^= c >> 12;
        b -= c; b -= a; b ^= a << 16;
        c -= a; c -= b; c ^= b >> 5;
        a -= b; a -= c; a ^= c >> 3;
        b -= c; b -= a; b ^= a << 10;
        c -= a; c -= b; c ^= b >> 15;
    }

    public static string GoogleCH(string url)
    {
        url = string.Format("info:{0}", url);

        int length = url.Length;

        UInt32 a, b;
        UInt32 c = GOOGLE_MAGIC;

        int k = 0;
        int len = length;

        a = b = 0x9E3779B9;

        while (len >= 12)
        {
            a += (UInt32)(url[k + 0] + (url[k + 1] << 8) + (url[k + 2] << 16) + (url[k + 3] << 24));
            b += (UInt32)(url[k + 4] + (url[k + 5] << 8) + (url[k + 6] << 16) + (url[k + 7] << 24));
            c += (UInt32)(url[k + 8] + (url[k + 9] << 8) + (url[k + 10] << 16) + (url[k + 11] << 24));
            _mix(ref a, ref b, ref c);
            k += 12;
            len -= 12;
        }
        c += (UInt32)length;
        switch (len)  /* all the case statements fall through */
        {
            case 11:
                c += (UInt32)(url[k + 10] << 24);
                goto case 10;
            case 10:
                c += (UInt32)(url[k + 9] << 16);
                goto case 9;
            case 9:
                c += (UInt32)(url[k + 8] << 8);
                goto case 8;
            /* the first byte of c is reserved for the length */
            case 8:
                b += (UInt32)(url[k + 7] << 24);
                goto case 7;
            case 7:
                b += (UInt32)(url[k + 6] << 16);
                goto case 6;
            case 6:
                b += (UInt32)(url[k + 5] << 8);
                goto case 5;
            case 5:
                b += (UInt32)(url[k + 4]);
                goto case 4;
            case 4:
                a += (UInt32)(url[k + 3] << 24);
                goto case 3;
            case 3:
                a += (UInt32)(url[k + 2] << 16);
                goto case 2;
            case 2:
                a += (UInt32)(url[k + 1] << 8);
                goto case 1;
            case 1:
                a += (UInt32)(url[k + 0]);
                break;
            default:
                break;
            /* case 0: nothing left to add */
        }

        _mix(ref a, ref b, ref c);

        return string.Format("6{0}", c);
    }

    public string getGooglePR(string url)
    {
        Uri myUri = new Uri(url);
        string srUrl = myUri.AbsoluteUri.ToString();
        string checksum = GoogleCH(srUrl);
        string query = string.Format("http://toolbarqueries.google.com/tbr?client=navclient-auto&features=Rank&ch={0}&features=Rank&q=info:{1}", checksum, srUrl);

        try
        {
            HttpWebRequest request = (HttpWebRequest)WebRequest.Create(query);
            string response = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
            if (response.Length == 0)
                return "01";
            else
                return int.Parse(Regex.Match(response, "Rank_1:[0-9]:([0-9]+)").Groups[1].Value).ToString() + "0";
        }
        catch (Exception E)
        {
            return E.Message.ToString();
        }
    }

c# 4.0

notice : the problem occurs when there are special characters in the url like &

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T08:51:31+00:00Added an answer on May 30, 2026 at 8:51 am

    Just check for the host of the particular website instead of the full url

    does the website url host has &?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am using javax.Mail api with authenticator, but this below code giving Access restriction:
I am using the code below to validate integers and floats in ASP.NET, but
I am using the code below to replace text inside a div. But I
I'm rendering PDF pages on iPhone using the code below. It works, but the
I am using below code to delete HTML Table row using javascript but its
I am using this code to read input stream but its not working It
Using the code below, I am returning an nvarchar field from MS SQL 2005
Using the code below, I am attempting to fill a Canvas with UIElements and
Using the code below (from a console app I've cobbled together), I add seven
I am using the code below to save and restore the window position and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.