alanhogan

alanhogan

Joined
Dec 18, 2007
Occupation
Information Architect
Location
USA
Website

Activity Stream

alanhogan commented on a Page, BBCODE  -  Jan 08, 2008

Also your script is vulnerable to cross-site scripting if you let visitors use it... e.g. [ooh click me!](javascript:submit_your_cookies_to_my_site();return false;)

 Respond  
alanhogan commented on a Page, Ban IP  -  Jan 08, 2008

To be more constructive -- first off thanks for commenting your code and explaining it to n00bs. Secondly, if you want to use regular expressions, the preg_ functions are supposed to be faster/better. Thirdly, try \'/^34\.12\.233\.254/$\' to match one address or \'/^34\.12\.233\.(1|2)?[0-9]{1,2}/$\' to match a range. ^ means \"Beginning of string\" and $ means \"end\" when they are used in the first and last positions ([^6] means any character except 6)

 Respond  
alanhogan commented on a Page, Ban IP  -  Jan 08, 2008

This script is incorrect... Won\'t it ban you if your IP is \"89.12.34.20\" and it\'s trying to ban \"189.12.34.206\"? Why not use == instead of ereg? It\'ll be faster anyway. This isn\'t Java; == doesn\'t compare identity in PHP but rather value!

 Respond  
alanhogan commented on a Page, Blacklist  -  Dec 18, 2007

A bit more description would be great
thanks mate

 Respond  
alanhogan commented on a Page, Dynamic Title and Meta Tags  -  Dec 18, 2007

I don\'t know, I\'m new here but this snippet seems pretty worthless except for a few special cases. I would like to say this site is a great concept and pretty good implementation though. I would like to see an easy way to see most-used and highest-rated snippets in any language, though!

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.