Re: [PHP] Re: Programming general question

2009-01-28 Thread Usamah M. Ali
On Wed, Jan 28, 2009 at 11:07 PM, Terion Miller webdev.ter...@gmail.com wrote: On Wed, Jan 28, 2009 at 3:54 AM, Ondrej Kulaty kopyto...@gmail.com wrote: Thanks for all the information, I was asking because I inherited thousands of lines of code that had used mysql_fetch_object(), yet I kept

Re: [PHP] Zend (or other) Framework...where to start?

2009-01-14 Thread Usamah M. Ali
On Thu, Jan 15, 2009 at 1:59 AM, Paul M Foster pa...@quillandmouse.com wrote: If you're going to go with a prebuilt framework, I'd recommend CodeIgniter for your first time out. If the docs look good to you (and they are pretty good), you'll probably do fine with it. It's about the lightest

Re: [PHP] Re: why are passwords stored encrypted in databases even when thedatathey protect is stored in the same database?

2008-06-13 Thread Usamah M. Ali
Taking into mind that email addresses extracted out of hacked databases is one of the main spam industry seeders, I always wonder why web application developers don't consider encrypting emails the same way they consider encrypting password! Once a hacker has full access to a database, an

Re: [PHP] Re: Forum coded in PHP with mail and news gateway

2008-06-12 Thread Usamah M. Ali
On Thu, Jun 12, 2008 at 4:34 PM, Bastien Koert [EMAIL PROTECTED] wrote: PHP does not support threading AFIAK. He probably meant threading as in forum threads, i.e. topics where discussions are presented in a threaded way. Regards, Usamah -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Re: Quickly verifying single word.

2008-06-05 Thread Usamah M. Ali
On Thu, Jun 5, 2008 at 9:19 AM, Per Jessen [EMAIL PROTECTED] wrote: Shawn McKenzie wrote: if (preg_match('/[\s]*/', $string) === false) { echo 'No spaces!'; } -Shawn Second one doesn't work for some reason. No time now to test, will later. How about: if (preg_match('/\s/',

Re: [PHP] Re: Quickly verifying single word.

2008-06-05 Thread Usamah M. Ali
On Thu, Jun 5, 2008 at 12:02 PM, Usamah M. Ali [EMAIL PROTECTED] wrote: Won't work either. The problem lies in using the === comparison operator. preg_match() returns 0 if no match is found, and FALSE if an error occurred. So using === will always echo 'No spaces' whether there were spaces

Re: [PHP] A problem with fgets()

2008-06-05 Thread Usamah M. Ali
Well, finally found an explanation and a solution: calling fgets() twice. Because if there's no length limit supplied (and it's not EOF) when calling the function, it continues reading until it finds the first newline character. So calling fgets() again will ensure that it will read from the

[PHP] A problem with fgets()

2008-05-29 Thread Usamah M. Ali
Hello, I have a function that picks up a random entry from a file consisting of city names, each name on a separate line. The random value is generated by rand() before fseek()ing to the position determined by it. The problem is that when using fgets() to get a random line, it returns a part of

Re: [PHP] A problem with fgets()

2008-05-29 Thread Usamah M. Ali
On Fri, May 30, 2008 at 3:38 AM, Chris [EMAIL PROTECTED] wrote: fseek doesn't go to the start of a line, it goes to a particular byte - so that's where the problem lies (not with fgets). There's no function (that I could see) which would go to the start of the line based on that offset (I

Re: [PHP] A problem with fgets()

2008-05-29 Thread Usamah M. Ali
On Fri, May 30, 2008 at 4:21 AM, Chris [EMAIL PROTECTED] wrote: I just need to figure out why when using fgets() with fseek() rand(), the script returns partial strings form the city names. Because fseek doesn't necessarily put you at the start of a line. It puts you anywhere (which could

Re: RES: [PHP] page suck attack

2008-05-21 Thread Usamah M. Ali
On Wed, May 21, 2008 at 8:51 PM, robert [EMAIL PROTECTED] wrote: Cool! yes Fasterfox could be it. If anyone cares, it also gave me some clues to what I was looking for: offline browsing. Certainly better keywords than page suck :) thank you everyone! Well, site rippers is a more suitable

Re: RES: [PHP] page suck attack

2008-05-21 Thread Usamah M. Ali
Sorry, the link: http://www.javascriptkit.com/howto/htaccess13.shtml Usamah On Thu, May 22, 2008 at 1:15 AM, Usamah M. Ali [EMAIL PROTECTED] wrote: On Wed, May 21, 2008 at 8:51 PM, robert [EMAIL PROTECTED] wrote: Cool! yes Fasterfox could be it. If anyone cares, it also gave me some clues