virus man
|
|
« on: July 29, 2008, 12:55:58 AM » |
|
Perhaps having an export feature would be the easiest way for people to have all of the customizing they want for the IP Database.
Simply have it export in a comma delimited format with a header at the top. Then we can import it into MS Excel or OO Calc for our own customization as well as faster searching etc.
It should be a very easy update to do. No more than a few minutes worth of coding I would think. And the possibilities for the players is practically unlimited. Plus you would no longer need to worry about doing any other customization on the IP DB.
|
|
|
Logged
|
SGP is opening their forums for all. From now on all Tutorials and Help files that SGP releases will be available there. SGP's Forums. New World Order
|
|
|
virus man
|
|
« Reply #1 on: July 29, 2008, 12:56:48 AM » |
|
Forgot. You can also do this for the Virii lists as well. It would save you a great deal of time and provide us unlimited customization options.
|
|
|
Logged
|
SGP is opening their forums for all. From now on all Tutorials and Help files that SGP releases will be available there. SGP's Forums. New World Order
|
|
|
black_ice
Newbie
Posts: 9
|
|
« Reply #2 on: July 29, 2008, 07:10:02 AM » |
|
This is the code to dump the IP address listing into CVS (using my best guesses as to what the tables are named), which could be altered to reflect process items. <?php $db = mysql_connect('localhost', 'username', 'password'); // Connect to the database (usually stored in config.php) $link = mysql_select_db('database name', $db); // Select the database name (unable to extract this from the page dump)
function parseCSVComments($comments) { $comments = str_replace('"', '""', $comments); // First off escape all " and make them "" if(eregi(",", $comments) or eregi("\n", $comments)) { // Check if I have any commas or new lines return '"'.$comments.'"'; // If I have new lines or commas escape them } else { return $comments; // If no new lines or commas just return the value } }
$sql = mysql_query("SELECT IP, name, owned FROM IP_DB"); // Start our query of the database (used variables based on the page dump) *edit, removed "action", as it is not needed for this dump $numberFields = mysql_num_fields($sql); // Find out how many fields we are fetching
if($numberFields) { // Check if we need to output anything for($i=0; $i<$numberFields; $i++) { $head[] = mysql_field_name($sql, $i); // Create the headers for each column, this is the field name in the database } $headers = join(',', $head)."\n"; // Make our first row in the CSV
while($info = mysql_fetch_object($sql)) { foreach($head as $fieldName) { // Loop through the array of headers as we fetch the data $row[] = parseCSVComments($info->$fieldName); } // End loop $data .= join(',', $row)."\n"; // Create a new row of data and append it to the last row $row = ''; // Clear the contents of the $row variable to start a new row } // Start our output of the CSV header("Content-type: application/x-msdownload"); header("Content-Disposition: attachment; filename=log.csv"); header("Pragma: no-cache"); header("Expires: 0"); echo $headers.$data; } else { // Nothing needed to be output. Put an error message here or something. echo 'No data available for this CSV.'; } ?>
|
|
« Last Edit: July 29, 2008, 07:24:11 AM by black_ice »
|
Logged
|
|
|
|
siremi
|
|
« Reply #3 on: July 29, 2008, 05:29:57 PM » |
|
Considering this suggestion.
Thank you
|
|
|
Logged
|
|
|
|
rokalth
|
|
« Reply #4 on: August 01, 2008, 01:56:56 PM » |
|
Hey fellows. If you can code, why dont you just do your own parser and copy/paste from the screen.. you can dump/save the data as you like to files or db.. The Developer has only two hands, this kind of massive software has a lots of work to. And if he really has built this alone, it is a massive work. If you ask him to work, you should pay for that See you
|
|
|
Logged
|
|
|
|
neo alpha
|
|
« Reply #5 on: August 01, 2008, 03:00:05 PM » |
|
Hey fellows. If you can code, why dont you just do your own parser and copy/paste from the screen.. you can dump/save the data as you like to files or db.. The Developer has only two hands, this kind of massive software has a lots of work to. And if he really has built this alone, it is a massive work. If you ask him to work, you should pay for that See you theorically ( i don't know how to write in english ), gold members are paying sir emi By the way ; it don't mean that sir emi is obligated to do everything they want... But , if it is something that he can do , will help the game , etc, i recomend
|
|
|
Logged
|
|
|
|
rokalth
|
|
« Reply #6 on: August 01, 2008, 06:41:36 PM » |
|
Work in this size project is huge. Im sure he must tired at times and needs rest as we all. If he does something for the players, its a bonus. If us gold players buy something, we buy the current game, in the time we do the payment - all other is a bonus. Ofc, next year we may think again, should we continue, if the game developement is not enough for our purposes.. I like this game. I like most of the attitude of the community. And of course, everyone is tired at times, even players. Keep up the spirit!
|
|
|
Logged
|
|
|
|
neo alpha
|
|
« Reply #7 on: August 01, 2008, 07:55:04 PM » |
|
Work in this size project is huge. Im sure he must tired at times and needs rest as we all. If he does something for the players, its a bonus. If us gold players buy something, we buy the current game, in the time we do the payment - all other is a bonus. Ofc, next year we may think again, should we continue, if the game developement is not enough for our purposes.. I like this game. I like most of the attitude of the community. And of course, everyone is tired at times, even players. Keep up the spirit! I understand what you mean and agree... All i was saying is that you said that Sir Emi isn't being paid... He is; maybe not enought , but he is getting some dollars at all
|
|
|
Logged
|
|
|
|
|