Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Coding Releases
You last visited: Today at 06:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release] Xtremetop100 Vote Comparer (W/ source)

Discussion on [Release] Xtremetop100 Vote Comparer (W/ source) within the Coding Releases forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
Zektor's Avatar
 
elite*gold: 40
Join Date: Aug 2007
Posts: 617
Received Thanks: 440
[Release] Xtremetop100 Vote Comparer (W/ source)



Download Binary & Source Code:

Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Threading;
using System.Text.RegularExpressions;

namespace WindowsFormsApplication4
{
    public partial class Form1 : Form
    {
        string[] links = new string[65535];
        string globallink = "http://www.xtremetop100.com/dekaron";
        int page = 0;
        public Form1()
        {
            InitializeComponent();
            CheckForIllegalCrossThreadCalls = false;
        }
        protected override void OnFormClosing(FormClosingEventArgs e)
        {
            base.OnFormClosing(e);
            if (e.CloseReason == CloseReason.WindowsShutDown)
            {
                return;
            }
            switch (MessageBox.Show(this, "Do you wish to close Vote Comparer?", "Exiting...", MessageBoxButtons.YesNo))
            {
                case DialogResult.No:
                    e.Cancel = true;
                    break;
                default:
                    Environment.Exit(0);
                    break;
            }
        }

        public string[,] reload()
        {
            WebClient client = new WebClient();
            String str = client.DownloadString(globallink);
            string[,] strArray = new string[500, 3];
            int cntr1 = 0, cntr2 = 0, cntr3 = 0;
            String insBanner = "<td class=\"stats1\"><br /><br /><b><span style=\"font-size: 12px; color: #000000;\">IN</span></b><br /> <span>";
            String outsBanner = "<td class=\"stats\"><br /><br /><b><span style=\"font-size: 12px; color: #000000;\">OUT</span></b><br /> <span>";
            String nameBanner = "style=\"text-decoration: none;\" rel=\"nofollow\">";
            String name = "<div id=\"middlebdba\"><a href=\"";
            String ins = "<div id=\"middlebdcb\">";
            String outs = "<div id=\"middlebdcC\">";
            foreach (string word in str.Split('\n'))
            {
                if (word.Contains(nameBanner))
                {
                    int a = word.IndexOf("rel=\"nofollow\">");
                    a += 15;
                    string newword = word.Substring(a, word.Length - a);
                    int b = newword.IndexOf("</a>");
                    newword = newword.Substring(0, b);
                    newword = "[Premium]" + newword;
                    strArray[cntr1, 0] = newword;
                    cntr1++;
                }
                else if (word.Contains(name))
                {
                    int a = word.IndexOf("rel=\"nofollow\">");
                    a += 15;
                    string newword = word.Substring(a, word.Length - a);
                    int b = newword.IndexOf("</a>");
                    newword = newword.Substring(0, b);
                    strArray[cntr1, 0] = newword;
                    cntr1++;
                }
                else if (word.Contains(insBanner))
                {
                    int a = word.IndexOf("<span>");
                    a += 6;
                    string newword = word.Substring(a, word.Length - a);
                    int b = newword.IndexOf("</span>");
                    newword = newword.Substring(0, b);
                    strArray[cntr2, 1] = newword;
                    cntr2++;
                }
                else if (word.Contains(ins))
                {
                    int a = word.IndexOf("<div id=\"middlebdcb\">");
                    a += 21;
                    string newword = word.Substring(a, word.Length - a);
                    int b = newword.IndexOf("</div>");
                    newword = newword.Substring(0, b);
                    strArray[cntr2, 1] = newword;
                    cntr2++;
                }
                else if (word.Contains(outsBanner))
                {
                    int a = word.IndexOf("<span>");
                    a += 6;
                    string newword = word.Substring(a, word.Length - a);
                    int b = newword.IndexOf("</span>");
                    newword = newword.Substring(0, b);
                    strArray[cntr3, 2] = newword;
                    cntr3++;
                }
                else if (word.Contains(outs))
                {
                    int a = word.IndexOf("<div id=\"middlebdcC\">");
                    a += 21;
                    string newword = word.Substring(a, word.Length - a);
                    int b = newword.IndexOf("</div>");
                    newword = newword.Substring(0, b);
                    strArray[cntr3, 2] = newword;
                    cntr3++;
                }
            }
            return strArray;
        }
        public bool refresh()
        {
            string[,] strArray = reload();
            label2.Text = "";
            label3.Text = "";
            label4.Text = "";
            label1.Text = "";
            int i = 0;
            this.label5.Location = new Point(label5.Location.X, 10);
            this.Height = 60;
            while (true)
            {
                if (strArray[i, 0] != null)
                {
                    label1.Text += "#" + (i + (50 * page) + 1) + "-" + strArray[i, 0] + "\r\n";
                    if (i == 0)
                    {
                        label2.Text += strArray[i, 1] + "\r\n";
                        label3.Text += strArray[i, 2] + "\r\n";
                        label4.Text += "\r\n";
                    }
                    else
                    {
                        int diffIns = Convert.ToInt32(strArray[i - 1, 1]) - Convert.ToInt32(strArray[i, 1]);
                        label2.Text += strArray[i, 1] + "\r\n";
                        label3.Text += strArray[i, 2] + "\r\n";
                        label4.Text += "+" + diffIns + "\r\n";
                    }
                    this.label5.Location = new Point(label5.Location.X, label5.Location.Y + 13);
                    this.Height += 13;
                }
                else
                {
                    break;
                }
                i++;
                if (i >= 50)
                {
                    button2.Enabled = true;
                }
                else
                {
                    button2.Enabled = false;
                }
            }
            label5.Text = "Last Updated: " + DateTime.Now;
            double Num;
            return double.TryParse(strArray[0, 1], out Num);
        }

        public void GenerateList()
        {
            WebClient client = new WebClient();
            String str = client.DownloadString("http://www.xtremetop100.com/");
            String cmp = "<div id=\"middleabgc\"><a href=\"/\" class=\"hei\">Show all</a>";
            foreach (string word in str.Split('\n'))
            {
                if (word.Contains(cmp))
                {
                    str = word;
                    break;
                }
            }
            string[] lines = Regex.Split(str, "class=\"hei\">");
            int combo = 0;
            foreach (string word in lines)
            {
                int aa = word.IndexOf("<a href=");
                String link = word.Substring(aa + 9, word.Length - (aa + 11));
                if (link.Length != 1)
                {
                    links[combo] = "http://www.xtremetop100.com/" + link;
                }
                else
                {
                    links[combo] = "http://www.xtremetop100.com/";
                }
                int a = word.IndexOf("</a>");
                if (a > 0)
                {
                    String newword = word.Substring(0, a);
                    comboBox1.Items.Add(newword);
                }
                combo++;
            }
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            new Thread(delegate()
            {
                GenerateList();
                comboBox1.SelectedIndex = 0;
                while (true)
                {
                    Thread.Sleep(60000);
                    refresh();
                }
            }).Start();
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            page = 0;
            label6.Text = "Page: " + (page + 1);
            globallink = links[comboBox1.SelectedIndex];
            refresh();
            button1.Enabled = false;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            button1.Enabled = true;
            page++;
            globallink = links[comboBox1.SelectedIndex] + "-" + (page * 50).ToString();
            if (refresh() == false)
            {
                page--;
                if (page <= 0)
                {
                    globallink = links[comboBox1.SelectedIndex];
                    button1.Enabled = false;
                }
                else
                {
                    globallink = links[comboBox1.SelectedIndex] + "-" + (page * 50).ToString();
                }
                refresh();
                button2.Enabled = false;
            }
            label6.Text = "Page: " + (page + 1);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (page > 1)
            {
                page--;
                globallink = links[comboBox1.SelectedIndex] + "-" + (page * 50).ToString();
                refresh();
                button2.Enabled = true;
            }
            else
            {
                page--;
                globallink = links[comboBox1.SelectedIndex];
                refresh();
                button1.Enabled = false;
            }
            label6.Text = "Page: " + (page + 1);
        }
    }
}
Enjoy Guys
Zektor is offline  
Old 08/29/2011, 09:55   #2
 
BigM''s Avatar
 
elite*gold: 11
Join Date: Nov 2009
Posts: 1,247
Received Thanks: 363
Nice, but the right place is !
BigM' is offline  
Old 08/29/2011, 13:38   #3


 
Cholik's Avatar
 
elite*gold: 4
Join Date: Aug 2008
Posts: 6,786
Received Thanks: 4,992
Use this thread for smaller releases:
Cholik is offline  
Closed Thread


Similar Threads Similar Threads
Vote Bot für xtremetop100
05/13/2010 - RO Exploits, Hacks, Bots & Guides - 7 Replies
ich suche die ganze zeit eine votebot fürein pserver in xtremetop site,ich kann nirgendwo finden.kann jemand mir so ein program posten bitte
[Release]How To Make Tq Source Work + Working Source + Server ByBass + Commands
12/08/2008 - CO2 PServer Guides & Releases - 15 Replies
1: How To Make The Server Work In fact, before other people did not just let ACC now with hi EACC Columbia landing on the settlement of the issue, and the rest is our own how to improve the content of those interested can improve the next. MY MY set and the same. INI MAP INI files and MAP with the client-to-date coverage of the account. server.dat ! And then as long as the client will be able to modify server.dat! 127.0.0.1 192.168.0.1 192.168.1.1 IP。 Please do generally use...



All times are GMT +2. The time now is 06:24.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.