Re: [PHP] HTTP Authentication
Wilbert Enserink wrote: Hi all, is it possible to do a HTTP Authentication with my own loginform instead of using the ugly pop up window? regards, Wilbert With a lot of thought, yes. You need to consider a few factors before you start. Security: Checking the IP address of the user. Performance: to DB or not to DB, that is the question! Security again: what kind of password algoritm are you going to use. And so on and so forth. I wish you the best of luck. I made such a script just a month ago :) -- Stig-Ørjan Smelror Systemutvikler Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] printing comma-delimited lists
What I'm doing here is fairly obvious (build a comma-delimited string). $arr = array(1,2,3,4,5); for ($i=0; $i sizeof($arr); $i++) { $lis = $lis . $arr[$i]; if ($i != (sizeof($arr)-1)) { $lis = $lis . ','; } } Question is, is there a more elegant way? I'm thinking of something like DTML's sequence-start and sequence-end, in a foreach construction. djo You could try implode() $lis = implode(,, $arr); -- Stig-Ørjan Smelror Systemutvikler Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Quickie
If nothing is beeing sent to output on the page then use header() else you need to use javascript. Niklas meta http-equiv=Refresh; Content=0; URL=file.php if headers are sent. Use header( Location: file.php ), as noted earlier, if no headers are sent. -- Stig-Ørjan Smelror Systemutvikler Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Am I right or wrong?
My ISP has a limit on my site of 10,000MB of data transfer per month. 4 days into september and I'm already at 2,500MB. It would seem they're including requests by their own PHP server. I have a folder of ~80kb images that are dynamically resized using PHP into ~1.4kb thumbnails. Now for each one the PHP server sends an HTTP request for the 80kb image, and this is being counted against my 10,000MB. Should it? Am I in the right in thinking that it shouldn't? regards, Everybody will always try to screw you some way or another... Always look at the small print ;) And you're right... it's wrong of them... imho. -- Stig-Ørjan Smelror Systemutvikler Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] help with strings...
Hei all. I've got this string, $string = test; and I want to make a $t; out of $string. Is this possible? I tried ${substr($string, 0, 1)}, but that didn't work ;) Any help appreciated. TIA. -- Stig-Ørjan Smelror Systemutvikler Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Why lynx don't work with cron?
Augusto Cesar Castoldi wrote: Hi, I'm trying the command lynx -dump -nolog http://localhost/script.php /dev/null on crontab but I (httpd) receive an e-mail from Cron Daemon saying that: Your terminal lacks the ability to clear the screen or position the cursor. what should I do run my script with cron? thanks, Augusto ___ Yahoo! GeoCities Tenha seu lugar na Web. Construa hoje mesmo sua home page no Yahoo! GeoCities. É fácil e grátis! http://br.geocities.yahoo.com/ One thing comes to mind. Compile PHP as a CGI and use that to run your scipts ;) -- Stig-Ørjan Smelror Systemutvikler Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Meaningful URL Validator
Hi all, I'm trying to make an URL validator, but I'm kind of stuck now. What I awnt it to do is as follows: It first checks to see if the server is up or down by doing a general fopen() on the URL. It then opens the URL in some way, checks the HTTP response code and spews out a meaningful message to the user. E.g. if it's a 404, the user will get a message saying the the page was not found. Has anybody done this before and have the kind heart to share it with me? ;) TIA -- Stig-Ørjan Smelror Systemutvikler Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] .htaccess username
Pavel Jartsev wrote: Tribun wrote: ...hmmm, I would guess there is a way, but I dont know why... Can I read out the active username, which has just logged in through a .htaccess authentication??? Like the access data.. user: patrick pass: linux can PHP reads out the usersname patrick ?? (and if ,... how? ;) $PHP_AUTH_USER and $PHP_AUTH_PW. It's also possible to use $REMOTE_USER. I don't know of any $REMOTE_PASS, so the suggestion above it good ;) -- Stig-Ørjan Smelror Systemutvikler Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]