Activity Stream
48,167 MEMBERS
61125 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 4 of 4 FirstFirst ... 234
Results 31 to 36 of 36
  1.     
    #31
    Banned
    Website's:
    warezlegend.org rslegend.org masthost.in piclegend.org proxylegend.org
    gr8 work buddy

  2.     
    #32
    Respected Developer
    Thanks for the feedback. For those familiar with the C# language, if you want to write an add-on for another site it's really easy. Say you want to write an add-on for myserialsite.com you would create a .cs file in the Addons folder called MySerialSite_com.cs. You use the code of one of the 2 default addons in there to quickly get a 'skeleton' for your add-on. This one for example:

    Code: 
    /* ---------------------------------------------------------
     *         LiveW Serial Finder Addon
     * ---------------------------------------------------------
     * 
     *  Created        : 08/12/2009 (dd/mm/yyyy)
     *  By            : Hyperz
     *  For Site    : www.serialnumber.in
     * 
     * ---------------------------------------------------------
     * 
     *  Additional credits :
     * 
     *  - HtmlAgilityPack V1.0
     *    Simon Mourier
     *    <simon underscore mourier at hotmail dot com>
     * 
     * ---------------------------------------------------------
     * 
     *  References linked in the CSharpCodeProvider are :
     *  - System.dll
     *  - System.Data.dll
     *  - System.Deployment.dll
     *  - System.Drawing.dll
     *  - System.Web.dll
     *  - System.Windows.Forms.dll
     *  - System.Xml.dll
     *  - lsf.exe
     * 
     * ---------------------------------------------------------
     *  (c) 2008 - Hyperz [hyperz.2007@gmail.com]
     * ---------------------------------------------------------
     * 
     *  This program is free software; you can redistribute it and/or modify
     *  it under the terms of the GNU General Public License as published by
     *  the Free Software Foundation; either version 2 of the License, or
     *  (at your option) any later version.
     *
     *  This program is distributed in the hope that it will be useful,
     *  but WITHOUT ANY WARRANTY; without even the implied warranty of
     *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     *  GNU General Public License for more details.
     *
     *  You should have received a copy of the GNU General Public License along
     *  with this program; if not, write to the Free Software Foundation, Inc.,
     *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
     *  
     */
    
    //#define DEBUG
    
    #region Namespaces
    using System;
    using System.Collections.Generic;
    //using System.Data;
    //using System.IO;
    using System.Net;
    //using System.Text;
    //using System.Text.RegularExpressions;
    using System.Web;
    using Hyperz.LSF;
    using HtmlAgilityPack;
    #endregion
    
    namespace Hyperz.LSF.Addons
    {
        public class SerialNumber_In : Grabber
        {
            public SerialNumber_In()
            {
                // Set up the required properties.
                this.Name = "SerialNumber.In";
                this.SearchUrl = "http://serialnumber.in/";
                this.SerialUrl = "http://serialnumber.in/includes/serial.php?id=";
            }
    
            public override string GetSerial(string id)
            {
                string serial = "";
                HtmlDocument doc = new HtmlDocument();
                doc.LoadHtml((new WebClient()).DownloadString(this.SerialUrl + id));
                
                try
                {
                    // Grab serial.
                    serial = doc.DocumentNode.SelectNodes("//textarea")[0].InnerText;
                }
                catch (Exception e)
                {
    #if DEBUG
                    System.Windows.Forms.MessageBox.Show(e.Message, this.Name + " Addon Error [GetSerial() Method]");
    #endif
                }
    
                // Return our serial.
                return HttpUtility.HtmlDecode(serial.Replace("\n", "\r\n"));
            }
    
            public override System.Windows.Forms.DataGridViewRow[] SearchFor(string search, System.Windows.Forms.DataGridView grid)
            {
                List<System.Windows.Forms.DataGridViewRow> results = new List<System.Windows.Forms.DataGridViewRow>();
                search = "q=" + Uri.EscapeDataString(search) + "&btnsearch=Search";
                string postResult = this.HttpPost(this.SearchUrl, search);
                
                // Did we get something?
                if (postResult == null) return results.ToArray();
    
                try
                {
                    System.Windows.Forms.DataGridViewRow result;
                    //string idAttr = "";
                    HtmlDocument doc = new HtmlDocument();
                    doc.LoadHtml(postResult);
                    
                    // Loop trough all elements that contain serials.
                    foreach (HtmlNode node in doc.DocumentNode.SelectNodes("/html/body/div/div[2]/div/div/div/table/tbody/tr"))
                    {
                        result = new System.Windows.Forms.DataGridViewRow();
                        result.CreateCells(grid);
    
                        string[] id = node.ChildNodes[1].ChildNodes[0].GetAttributeValue("href", "").Split('/');
    
                        // Setup the values:
                        // --------------------------
                        // 0 => the unique id, leave this to null. The backend will automaticly set it ;)
                        // 1 => website name
                        // 2 => serial key title
                        // 3 => OS platform, set as "N/A" when the site doesn't give this info.
                        // 4 => the ID we're going to need to call the right page for this serial (this cell is hidden).
                        result.Cells[0].Value = null;
                        result.Cells[1].Value = this.Name;
                        result.Cells[2].Value = node.ChildNodes[1].ChildNodes[0].InnerText + " " +
                            "[" + node.ChildNodes[0].InnerText + "] " +
                            "[" + node.ChildNodes[2].InnerText + "]";
                        result.Cells[3].Value = "N/A";
                        result.Cells[4].Value = id[id.Length - 1].Trim();
    
                        // Add to the result to the list.
                        results.Add(result);
                    }
                }
                catch (Exception e)
                {
    #if DEBUG
                    System.Windows.Forms.MessageBox.Show(e.Message, this.Name + " Addon Error [SearchFor() Method]");
    #endif
                }
    
                // Convert list to an array and return it.
                return results.ToArray();
            }
        }
    }
    If you know C# that code should be really easy to understand. All you have to do is edit the class name and make edits to the 2 functions. You can do this in less then 30 minutes.

    Every time the program starts it will compile all .cs files in the Addons folder and generate a DLL for them which will get loaded by the program. So you don't really need Visual Studio or anything, even good ol' notepad will do to quickly write an add-on.

  3.     
    #33
    Member
    Website's:
    mvfenda.com bissaaveli.com
    link not working


  4.   Sponsored Links

  5.     
    #34
    Member
    Link down
    A life spent making mistakes is not only more honorable, but more useful than a life spent doing nothing. ? George Bernard Shaw
    ?
    Designer. Check my designs here.

  6.     
    #35
    Respected Developer

  7.     
    #36
    mmm mmm!
    Grabbing this one to.
    HATERS GONNA probably bring up some valid points considering I am an ignorant little twat so far up my own ass that i blame my problems on everyone and if you criticize me you're automatically wrong.

Page 4 of 4 FirstFirst ... 234

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Microsoft goes open-source with their web stack
    By ShareShiz in forum News & Current Events
    Replies: 0
    Last Post: 28th Mar 2012, 04:25 PM
  2. Replies: 1
    Last Post: 29th Feb 2012, 04:41 AM
  3. [C#/WPF] NFO Viewer (open source)
    By Hyperz in forum Web Development Area
    Replies: 35
    Last Post: 23rd Aug 2011, 06:35 AM
  4. Open Source Technology???
    By shakiljavid in forum General Discussion
    Replies: 9
    Last Post: 25th May 2009, 01:09 PM
  5. Open Source Game
    By hip_hop_x in forum Webmaster Discussion
    Replies: 0
    Last Post: 4th Sep 2008, 07:52 PM

Tags for this Thread

BE SOCIAL