Re: [PHP] Protecting database passwords

2004-07-01 Thread Bob Hockney
Gerben wrote: > I think he is talking about the password that is written inside the script > in the mysql_connect statement. I think he is worried that someone could > access it's code and find out the DB password. What I am concerned about is a local user on the server machine, not access throug

[PHP] Protecting database passwords

2004-06-29 Thread Bob Hockney
Hi there, I wrote a php script that accesses a database, and I am wondering about securing the password to the database. I could prompt the user for the password every session, but I don't necessarily want the user to have the password. Unless I'm missing something, any on-disk place I store

Re: [PHP] Check type of uploaded file

2003-12-07 Thread Bob Hockney
Gerard Samuel wrote: > On Saturday 06 December 2003 11:01 pm, Richard Davey wrote: > > Yes, check the $_FILES['userfile']['type'] after upload. > > > That can be spoofed. > There isn't really a way to determine file types... I was thinking of trying something like ereg("[[:print:]]*", "$contents"

Re: [PHP] Check type of uploaded file

2003-12-07 Thread Bob Hockney
Richard Davey wrote: > BH> I want to test an uploaded file to see if it is a text file, but I don't want > BH> to rely on the presence of an os command such as 'file.' Is there a > BH> straightforward way to do this within PHP? Thanks in advance. > > Yes, check the $_FILES['userfile']['type'] a

[PHP] Check type of uploaded file

2003-12-06 Thread Bob Hockney
Hi there, I want to test an uploaded file to see if it is a text file, but I don't want to rely on the presence of an os command such as 'file.' Is there a straightforward way to do this within PHP? Thanks in advance. -Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

Re: [PHP] Find the last friday of each month.

2003-10-26 Thread Bob Hockney
Bob wrote: > The last friday of the following month will be the last friday of the current > month + the number of day in the current month > 28 ( date("t") - 28 ). OOPS! I meant the The last friday of the following month will be the *date* of the last friday of the current month MINUS the num

Re: [PHP] Find the last friday of each month.

2003-10-26 Thread Bob Hockney
> OrangeHairedBoy wrote: > >Basically, I just want to show what the last friday of the month is, and if > >that date has already passed, show the last friday of the next month. > > You can get the number of days in a month from date() > > Now you know that the last Friday of the month will be at