Re: [PHP] Asking for input from shell?

2001-04-09 Thread enthalpy
Engineer II) ([EMAIL PROTECTED] Network Operations) <-Enthalpy.org-http://enthalpy.org-> ([EMAIL PROTECTED] The World of Nothing) <--> On Mon, 9 Apr 2001, Jason Brooke wrote: > $fp = fopen(

Re: [PHP] Asking for input from shell?

2001-04-08 Thread enthalpy
> ([EMAIL PROTECTED] The World of Nothing) <--> On Mon, 9 Apr 2001, Jason Brooke wrote: > $fp = fopen("php://stdin", "r"); > echo fgets($fp, 64); > fclose($fp); > > - Original Messa

[PHP] Asking for input from shell?

2001-04-08 Thread enthalpy
anyone have sample code of how you can have a php script (cgi) ask for input from the shell? <-CoreComm-Internet-Services---http://core.com-> (Jon Marshall CoreComm Services Chicago) ([EMAIL PROTECTED] Systems Engineer II) ([EMAIL PROTECTED] Netw

Re: [PHP] replacing a line in a file

2001-03-13 Thread enthalpy
ote: > maybe this? > > while($line = fgets($fp, 1024)) { > $line = str_replace("replace_this", "with_this", $line); > $content .= $line; > } > > fwrite($fp, $content); > > -- > Henrik Hansen > - Original Message - > Fro

[PHP] replacing a line in a file

2001-03-13 Thread enthalpy
having problems replacing a line in a file. need to search the whole document for a string and then replace that line with a string. any ideas? this is causing lots of problems now. $fpoint3 = fopen ($testshadow, "r+") or die("couldnt open shadow file again"); $contents = fread ($fpoint3, $s

Re: [PHP] fputs?

2001-03-13 Thread enthalpy
Systems Engineer II) ([EMAIL PROTECTED] Network Operations) <-Enthalpy.org-http://enthalpy.org-> ([EMAIL PROTECTED] The World of Nothing) <------> On Tue, 13 Mar 2001, enthalpy wrote: > &g

[PHP] fputs?

2001-03-13 Thread enthalpy
can you use str_replace or ereg_replace in an fputs statement? something like this fputs("$fpoint2", "str_replace($oldcrypt, $newcrypt, $shadow[2])"); i need to replace a string in a file. the string is in an array tho.. is that why this isnt working? <-CoreComm-Internet-Services---http:

Re: [PHP] Replace a string in array then re-write line.

2001-03-08 Thread enthalpy
ck preg_replace: > http://www.php.net/manual/en/function.preg-replace.php > > regards, > jaxon > > On 3/8/01 11:32 PM, "enthalpy" <[EMAIL PROTECTED]> wrote: > > > > > im just using 2 flat files. is there any kind of freplace? or can i use >

Re: [PHP] Replace a string in array then re-write line.

2001-03-08 Thread enthalpy
(strtr($string, $array)); > > just my .02: > > regards, > jaxon > > > > > On 3/8/01 10:53 PM, "enthalpy" <[EMAIL PROTECTED]> wrote: > > > > > ok so im using fopen to read a file split each line in to an array. Check > > those variables ag

[PHP] Replace a string in array then re-write line.

2001-03-08 Thread enthalpy
ok so im using fopen to read a file split each line in to an array. Check those variables against the same situation with a different file. Replace a string in the second file with a string in the first file. Then rewrite the line with the new variable. here is a small example of how im opening

Re: [PHP] breaking up images to sets of 5

2001-02-06 Thread enthalpy
On Wed, 7 Feb 2001, Mark Green wrote: > enthalpy wrote: > > > > i use mysql to store urls for all my images and have php query that for > > the images. is there an easy way to set it up so it does 5 at a time and > > has a lil next 5 link at the bottom.. t

[PHP] breaking up images to sets of 5

2001-02-06 Thread enthalpy
i use mysql to store urls for all my images and have php query that for the images. is there an easy way to set it up so it does 5 at a time and has a lil next 5 link at the bottom.. the entriees in the table are not numbered. <-CoreComm-Internet-Services--http://core.com/-> (Jon Marshal

[PHP] Retrieve item from table at random

2001-02-06 Thread enthalpy
anyone have example code for randomly grabing an item from a mysql table? <-CoreComm-Internet-Services--http://core.com/-> (Jon Marshall CoreComm Services Chicago) ([EMAIL PROTECTED] Systems Engineer II) ([EMAIL PROTECTED] Network Operations) <--

Re: [PHP] Change Password script

2001-02-06 Thread enthalpy
TECTED] Network Operations) <-Enthalpy.orghttp://enthalpy.org/-> ([EMAIL PROTECTED] The World of Nothing) <--> On Sat, 3 Feb 2001 [EMAIL PROTECTED] wrote: > enthalpy wrote: > > > &

Re: [PHP] Change Password script

2001-02-02 Thread enthalpy
D]) wrote: > >Not unless passwd takes stdin (which i don't think it does) > > It does, but php would have to be running as root, which is a bad > idea. > > >--Joe > > > >On Fri, Feb 02, 2001 at 04:07:47PM -0600, enthalpy wrote: > >>

Re: [PHP] Change Password script

2001-02-02 Thread enthalpy
ations) <-Enthalpy.orghttp://enthalpy.org/-> ([EMAIL PROTECTED] The World of Nothing) <--> On Fri, 2 Feb 2001, Joe Stump wrote: > DB password or unix password? > > --Joe > > On Fri, Feb 02, 2

[PHP] Change Password script

2001-02-02 Thread enthalpy
anyone have example code of a change password script in php? <-CoreComm-Internet-Services--http://core.com/-> (Jon Marshall CoreComm Services Chicago) ([EMAIL PROTECTED] Systems Engineer II) ([EMAIL PROTECTED] Network Operations) <-Enthalpy.o