====== How to use the "geturl" in good case ====== See also: "[[:documentation:all_commands_premium#geturl_url|geturl]]" \\ ===== Intruduction ===== The PikkuBot is able to log Avatars, Prims, Sims and Sandboxes. This is possible with the command "getfile" in the file **logfile/HUNTER.txt** or with the "geturl" command and a Webserver. Of course the last command is much better for the usability, but its another topic. You can use any scripting language you want, in this demo we use PHP and MySQL.. ===== Requirements ===== Database with MySQL and a Webserver with PHP. ===== Step by Step ===== ==== Create a new database ==== The best program for it is **phpMyAdmin**. Create a new Database and call it **pikkubot**. ==== Creation of a sample table for avatars ==== This is how the table can looks like: CREATE TABLE `pikkubot_avs` ( `pikkubot_avs_id` int(11) NOT NULL auto_increment, `pikkubot_avs_datum` datetime NOT NULL default '0000-00-00 00:00:00', `pikkubot_avs_lastseen` datetime NOT NULL default '0000-00-00 00:00:00', `pikkubot_avs_name` text NOT NULL, `pikkubot_avs_key` text NOT NULL, `pikkubot_avs_sim` text NOT NULL, `pikkubot_avs_vector` text NOT NULL, `pikkubot_avs_hash` varchar(32) NOT NULL default '', PRIMARY KEY (`pikkubot_avs_id`), KEY `pikkubot_avs_hash` (`pikkubot_avs_hash`) ) ENGINE=MyISAM; ==== A PHP-script for logging in the database ==== We need a script to log the datas collected from the bot in the database, we call the file **log.php**: Please replace **Username** with the MySQL Database User (for example root) and **password** with the pass of this user. \\ ==== Insert the URL in the Bot Program ==== Just insert following command in your Bot window: geturl http://my_server/log.php Now the bot should log the found Avatars in the database. Pleace verify this with phpMyAdmin. ==== PHP-Skript to view the data ==== Now you need a simple script to show the logged Avatars, we call the file **hunted.php**:
"; $select=mysql_query(" select * FROM pikkubot_avs ORDER BY pikkubot_avs_lastseen DESC LIMIT 0,50 "); if (mysql_num_rows($select)>0 ) { echo "Last 50 seen Avatars :

"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; for ($a=0; $a"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
First-SeenLast-SeenAvatar-NameAvatar-KeyAvatar-SimAvatar-Vector
$row[pikkubot_avs_datum]$row[pikkubot_avs_lastseen]$row[pikkubot_avs_name]$row[pikkubot_avs_key]$row[pikkubot_avs_sim]$row[pikkubot_avs_vector]
"; } else { echo "... Sorry, no Avatars seen yet ...
"; } ?>
Done!\\ \\ Of course you can edit the scripts for your own use as you like! \\ See also: [[:howtos:geturl_for_prims|Enhance "geturl" for prims]] \\ \\ ~~UP~~ ----