View Single Post
Old 17.04.2007, 21:11   #16
Osito2Dancer
Архивный участник
 
Join Date: Mar 2005
Posts: 442
Default

Quote:
Originally Posted by bruj0 View Post
Thanx for sharing, could you specify what fixes you did? I cant see any in a fast look at the code..
From yours:

1) Instead of using "file(XXX)" i used a function proposed in php.net that opens the file with fopen, and while it doesnt find the EOF, it stores the whole line (with \n included and separator between files) on an array. Slower, but for servers with a lot of accounts, it functions in a better way.

2) I eliminated the funtion "UniqueRands" and made a secuential program (it doesnt get called, but it just works in a "while" loop). It feeds "rands" array with the uid and the new uid (in the form: rand[0] = uid1, rand[1] = newuid1, rand[2] = uid2, rand[3] = newuid2, etc.

3) Added some messages for display (so the user can know that the program is doing something ).

4) Fixed some errors on the query part (you had $uid inside the " " and didnt take the value from outside, but instead did a query with '$uid' rather than the actual value).

5) Added a new file writing part that writes the whole temporal array "rands" to a file, so you can check which ID got which number.

6) Fixed some "OOB" problems with some of the arrays.

7) Just asks for uid.csv (not builderuid.csv, that can be fixed by own server admins).

Nothing much, just fixed it to be more secuential and more easy to understand. I kept the credits to you on the file and just added myself below you .

Atte

Oso
Osito2Dancer is offline