|
Jake24 Numanox
Registered User
Join date: 3 Apr 2008
Posts: 6
|
04-15-2008 20:26
I want to make my own Name2Key database. I have all of the stuff down, I just need the mysql and php. Can someone walk me through it? (or post the commented code and I'll figure it out myself with the help of google :]) Thanks in advance
|
|
Talarus Luan
Ancient Archaean Dragon
Join date: 18 Mar 2006
Posts: 4,831
|
04-15-2008 20:40
From: Jake24 Numanox I want to make my own Name2Key database. I have all of the stuff down, I just need the mysql and php. Can someone walk me through it? (or post the commented code and I'll figure it out myself with the help of google :]) Thanks in advance Post the commented code and you will figure it out yourself? Uhh.. OK. Righty-o.  Not likely. Simple run-down of the easy part: Make a database. Make a table in said database. Put two fields in it: SLName and SLKey. Make them character fields. 64 for the name, and 36 for the key. Make either one or two php scripts for two functions: Add and Query. Secure the Add function in some way such that some twit doesn't fill your DB with bogus data. Add function takes two params, probably via a POST command: Name and Key. Execute a SELECT statement on one or the other data field. If the record already exists, don't do anything (or update it if you're anal), otherwise, execute an INSERT statement. For the Query function/script, it takes one parameter, probably using the GET command. Do the same basic SELECT statement you used in the Add function, but return the key for the name provided, or some kind of "not found" response otherwise. Now, here comes the tricky part that makes it useful: Find a way to populate your database with 10-12 MILLION entries. Good luck!
|
|
Boreal Latte
Registered User
Join date: 15 Nov 2007
Posts: 104
|
04-15-2008 23:30
From: Talarus Luan Now, here comes the tricky part that makes it useful:
Find a way to populate your database with 10-12 MILLION entries.
Put a bot on your server (see example from libsecondlife), and populate your database on demand using the table Talarus described as a cache.
|