Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple IP verification
#1
This is one of the first things I ever made, it is quite useful and a bit messy.

(11-23-2010, 08:40 PM)Guest Wrote: Alright, did the 'Support' get removed from SupportForums?
You're not a good Emotional Helper.
Reply
#2
PHP has a very powerful library of array functions. Specifically, the in_array () function would apply nicely here. Instead of looping through the array you could simply call that function.

Also, in a situation where you're looping through a set looking for a positive flag ($access in this case), it's best to default the flag to false and then switch it to true if the condition necessitates it. This prevents you from having to write wasteful ELSE statements and thus improves efficiency.
Ho, ho, ho! Well, if it isn't fat stinking billy goat Billy Boy in poison!
How art thou, thou globby bottle of cheap, stinking chip oil?
Come and get one in the yarbles, if ya have any yarbles, you eunuch jelly thou!
Reply
#3
(11-21-2010, 11:13 PM)Disease Wrote: PHP has a very powerful library of array functions. Specifically, the in_array () function would apply nicely here. Instead of looping through the array you could simply call that function.

Also, in a situation where you're looping through a set looking for a positive flag ($access in this case), it's best to default the flag to false and then switch it to true if the condition necessitates it. This prevents you from having to write wasteful ELSE statements and thus improves efficiency.

I know, I have rewritten one for personal use. This is as I said, the first script I made, no modifications. It's quite old.
(11-23-2010, 08:40 PM)Guest Wrote: Alright, did the 'Support' get removed from SupportForums?
You're not a good Emotional Helper.
Reply
#4
Quite basic and useful too.
Reply
#5
Yeah basic stuff but nice of you to contribute.
Reply
#6
That gave me an excellent idea, I made make something similar to this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)