ganglia
Results 1 to 15 of 23

Thread: Create Your First BOT

Threaded View

  1. #1
    Join Date
    Jan 2005
    Posts
    623

    Create Your First BOT

    Create Your First BOT

    This will be a very, very basic tutorial on what a bot is and how to create one. First you need to understand that a "BOT" is only a series of programming commands/functions that do "SOMETHING".

    In this example my bot will: GRAB ALL USERNAMES FROM ALL-NETTOOLS.COM

    First we need to find out how all-nettools.com displays usernames so first we need to click on "[url=http://www.all-nettools.com/forum/memberlist.php]Member List[/url]".

    Notice the URL structure of each user profile: [url]http://www.all-nettools.com/forum/member.php?u=657*[/url]
    With a little digging you will find that the first user (OTTO - administrator) is
    [url]http://www.all-nettools.com/forum/member.php?u=*[/url]

    We can now get started writing our bot. You need to make a step by step list of what you want the bot to do.


    *. Check to see if URL exists
    2. Grab HTML from URL
    *. Find username starting point in html
    4. Find username ending point in html
    5. Grab next URL


    PHP CODE
    Code:
    function bot_allnettools($user){
    	// CHECK TO SEE IF URL EXISTS
    	if($current_webpage=file_get_contents("http://www.all-nettools.com/forum/member.php?u=" . $user)){
    		
    		$user_identifier_beginning="<div class=\"bigusername\">";
    		$user_identifier_end="<img";
    		
    		// CHECKS FOR MATCHING PATTERN WITH BEGINNING AND ENDING IDENTIFIERS (NOTICE THE WILDCARD IN THE MIDDLE)
    		if (preg_match('/' . $user_identifier_beginning . '(.*?)' . $user_identifier_end . '/',$current_webpage,$match)) {
    			$match[0]=str_replace($user_identifier_beginning,"",$match[0]);
    			$match[0]=str_replace($user_identifier_end,"",$match[0]);
    			return($match[0]);
    		}
    	}
    	return(0);
    }
    I am not posting my live example because it uses a lot of the bandwidth allocated to all-nettools.com. This was only an example so please do not use this information to create bots on all-nettools.com or you will be permanently banned and reported to your ISP.

    ~SyntaX
    Last edited by SyntaXmasteR; 08-21-2007 at 08:34 PM.
    [url=http://www.syntax******.info/tools/services.php]Speed Up Windows XP[/url]
    [url=http://www.syntax******.info/tools/ip.php]Get An Ip Address[/url]
    [url=http://www.syntax******.info/tools/base_converter.php]Base Converter[/url]
    --------------------------------
    [URL=http://www.boninroad.com/syntax******/]Old Site[/URL]
    [URL=http://www.syntax******.info]Comming Soon[/URL]

Similar Threads

  1. how would i create a http server
    By dipman44 in forum Internet Privacy
    Replies: 6
    Last Post: 06-25-2015, 03:13 AM
  2. Create Your Own Prank
    By SyntaXmasteR in forum Programming
    Replies: 17
    Last Post: 11-02-2009, 07:32 AM
  3. How create polls?
    By idnedhelper in forum General discussion
    Replies: 2
    Last Post: 11-13-2007, 11:58 AM
  4. can Anyone Create a Php mailer?
    By ghost22 in forum Programming
    Replies: 0
    Last Post: 02-12-2007, 07:05 PM
  5. create your own whatismyip
    By ~~smart~fool~~ in forum Programming
    Replies: 1
    Last Post: 12-03-2006, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts