[PHP] Re: apache htpasswd win32
You could do it like this: exec( htpasswd -b $passwdfile $username $password ); /nico [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi everybody I would like to know if somebody already wrote a script to allow apache user administration from php under Win32 All the scripts I found are made for linux (using crypt function) I tried to generate the password with the md5 function but it's not working perhaps I don't know how to use it. Could you help me ? Laurent Drouet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Selective seeing =)
not tested :) $lines = file( 'http://www.cow.net/cows/' ); print $lines[ rand()%sizeof($lines) ]; /nico Liam [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... 12/03/2002 11:20:18 PM Hey all, I'm looking to write a PHP script that will cut all content out of a page and only display one line. For example, take this URL: http://www.cow.net/cows/ I want a script that will get this page, but only display the line at the bottom of the page that says: I will never speak to Sara Glover again The real use is to get the current usage from my ISP's online tracking system and display it on a page without 1) having to log in and 2) displaying my password. The page is accessible but just sending all paramaters in the URL, so a login as such isn't nesessary. The question is, does anyone know of any classes or PHP programs that I could use to do this? Cheers, Liam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Calling a Variable in a weird Way
You can do: for ($i=1; $i 12; $i++) { $n = state_$i; echo $$n; } That should do what you want (if I understood what you want correctly ;) /nico Phillip S. Baker [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I am not sure I can articulate this well. But I will try. I want to combine either two variables or a variable and string to bring up the name of a previous variable name to display the data from the first. So in the first part I will have a listing that will look like type=radio name=state_1 value=No type=radio name=state_1 value=Yes type=radio name=state_1 value=Maybe type=radio name=state_2 value=No type=radio name=state_2 value=Yes type=radio name=state_2 value=Maybe // Submit etc Then later I will call a for loop to try and do something like for ($i=1; $i 12; $i++) { echo state_$i; // This would print out either Yes No or Maybe. } Is there a way I can do this. I thought I heard something about how I can but I do not remember. Phillip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alphabet
$iord('Z') seems easier to me than $iord('A')+26 :) /Nico Edward Van Bilderbeek - Bean It [EMAIL PROTECTED] wrote in message 002601c1c5c4$d008e3f0$2d48c23e@VANBILDE01">news:002601c1c5c4$d008e3f0$2d48c23e@VANBILDE01... something like: for ($i=ord('A'); $iord('A')+26; $i++) { $str .= chr($i); } print $str; Greets, Edward - Original Message - From: Jeroen Timmers [EMAIL PROTECTED] To: [General] [EMAIL PROTECTED] Sent: Thursday, March 07, 2002 11:37 AM Subject: [PHP] Alphabet Is there a simple function to generate the alphabet with php Thx Jeroen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Alphabet
Very true. oops :) /Nico - Original Message - From: David Apthorpe [EMAIL PROTECTED] To: 'Nico Vrouwe' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, March 07, 2002 2:34 PM Subject: RE: [PHP] Alphabet : Shouldn't it be $i=ord('Z') ? : : David Apthorpe : : -Original Message- : From: Nico Vrouwe [mailto:[EMAIL PROTECTED]] : Sent: 07 March 2002 13:30 : To: [EMAIL PROTECTED] : Subject: Re: [PHP] Alphabet : : $iord('Z') seems easier to me than $iord('A')+26 :) : : /Nico : : : Edward Van Bilderbeek - Bean It [EMAIL PROTECTED] wrote in message : 002601c1c5c4$d008e3f0$2d48c23e@VANBILDE01">news:002601c1c5c4$d008e3f0$2d48c23e@VANBILDE01... : something like: : : for ($i=ord('A'); $iord('A')+26; $i++) { : $str .= chr($i); : } : : print $str; : : Greets, : : Edward : : : - Original Message - : From: Jeroen Timmers [EMAIL PROTECTED] : To: [General] [EMAIL PROTECTED] : Sent: Thursday, March 07, 2002 11:37 AM : Subject: [PHP] Alphabet : : : Is there a simple function to generate : the alphabet with php : : Thx : : Jeroen : : : : : : : -- : PHP General Mailing List (http://www.php.net/) : To unsubscribe, visit: http://www.php.net/unsub.php : : --- : Incoming mail is certified Virus Free. : Checked by AVG anti-virus system (http://www.grisoft.com). : Version: 6.0.330 / Virus Database: 184 - Release Date: 28/02/2002 : : : --- : Outgoing mail is certified Virus Free. : Checked by AVG anti-virus system (http://www.grisoft.com). : Version: 6.0.330 / Virus Database: 184 - Release Date: 28/02/2002 : -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: using a variable to a function call
You could try something like this: eval( \$class- . $var . _function(); ); /nico Matt Williams [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi all I get a variable that is set be a select box on a page. I want to use this variable to call a function within a class that is based on it's name. so if $var = me I want to call $class-me_function(); or if $var = you call $class-you_function(); How can I use the variable as part of the function name to call. TIA matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Stopping PHP from sending any headers
Hi there! I am wondering if there is any way to stop PHP from sending any headers at all. I know about php -q, but unfortunately I want it to work with the module version of PHP as well. What I do is collect all output with the ob_ functions, and send it to a pipe. And there the output is encoded, headers are sent and the content is sent to stdout. However, after this is done, more headers are being sent by PHP. I want to keep it as much as possible outside the PHP code (I have my reasons :) I guess I could grab the output from the pipe, but if there's a way to make php not send any headers at all that'd be much nicer. Right now I fixed it by printing !-- in the external prog, and after that -- in the php code, so at least the headers don't show up in the browser.. Nice is something else tho. Any ideas? Thanks! /Nico -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php