[PHP] Caching Problem

2002-03-06 Thread Paul A. Procacci
Hey all, I'm trying not to cache a page. I have the following code: $return = split( , exec(vmstat)); $cpu_top = 100; $return = $cpu_top - $return[count($return) -1]; which returns the amount of idle cpu time. The problem is this, every time the page is loaded,

[PHP] Re: Caching Problem

2002-03-06 Thread Paul A. Procacci
Hah, I found the problem. It's because vmstat when called always, initially has the cpu idle at 99. This explains it. So, how would I go abouts returning used cpu time on a system? Thanks, Paul Paul A. Procacci wrote: Hey all, I'm trying not to cache a page. I have

[PHP] Re: header() and frames

2002-03-06 Thread Paul A. Procacci
Does that actually work? I'm using Mozilla, and it didn't work for me? :) Paul Jim Winstead wrote: Alan McFarlane [EMAIL PROTECTED] wrote: header(location: index.php; target: _top); header(Location: index.php); header(Window-target: _top); jim -- PHP General Mailing List

[PHP] Re: Can I authenicate user with the accounts in passwd and shadow??

2002-03-04 Thread Paul A. Procacci
It's easiest to do this using apache, and not php It's called mod_auth_pwcheck You can find information from http://wwwchelcomru/~anton/projects/mod_auth_pwcheck/; Hope this helps Paul Zenith wrote: I know that, I can use HTTP, or just normal HTML to prompt for user id and password And

[PHP] regex

2002-02-27 Thread Paul A. Procacci
Hey all, I'm been programming in php for a while, but I'm stumpt with this one You know the funny thing? It's probably really simple Anyway here it is Assume I have this query string: ticket_id=3change_name=statuschange_value=3ticket_id=32=1= And all I want is 2=1= Well, the closest I

[PHP] Re: Memory usage with Apache

2002-01-27 Thread Paul A. Procacci
How are you executing top? Sounds like you need to use the -d option for top. Example: $exec - exec(top -d1); This way, top won't, run and run and run, and run, and run, etc, etc, etc. Try that Paul Thomas E. Ruth wrote: Hello, I'm using PHP 4.0.4pl1 with Apache 1.3.14. I have a PHP

[PHP] Re: Write to file?

2002-01-27 Thread Paul A. Procacci
Try inserting a \n at the end of each string you write. This is a new- line character. Paul Mårten andersson wrote: Hello folks… I want to write to a textfile, but I want a row for each string I write to the file. As it is now when I write to the file it just starts writing where the

[PHP] Re: binary file + fread

2002-01-27 Thread Paul A. Procacci
Try ?php $filename = /export/html/log; $fd = fopen( $filename, rb ); //Notice the b $a = fread( $fd, 4 ); $b = fread( $fd, 4 ); printf( a= %lx b=%lx, $a, $b); fclose( $fd ); ? notice the b in the fopen, it stand for binary. Paul Michael Agbaglo wrote: Hi ! I've some trouble w/ the

Re: [PHP] a quick question..

2002-01-27 Thread Paul A. Procacci
He meant push Nick Wilson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * and then Tauntz blurted If I have n variables: $nr1 = some text; $nr2 = some other text $nr3 and I want to print the text randomly (like if I enter the page.. it displays $nr1... next

[PHP] Re: Simple (I hope) updating contents question

2001-07-20 Thread Paul A. Procacci
The fgets length is like this: It's the number of bytes read from a file OR up to a new line character. Which ever comes first. It's as simple as that. Try this: ? $file = filename.txt; // Name of file $fp = fopen($file, r); if(!$fp){ echo Couldn't open file for reading.; } else{ $i =

Re: [PHP] Email Software

2001-07-20 Thread Paul A. Procacci
I have just recently wrote a php script that strips email address's off of websites, and will continually follow links until a certain depth. You can easily modify the script to mail or log all entries found. The script also discards duplicates found. Sounds Interesting? Let me know. The

[PHP] Re: Restoring a backup

2001-07-20 Thread Paul A. Procacci
Not usre if anyone answered your question yet, but, first off, I'm not positive. I would try mysql -u root -p !database_name! !filename! ignore the (!) characters. :) paul Don wrote: Hi, I have a cron script that issues a: mysqldump --opt -ppassword myfile_db

[PHP] Command line args HELP!!!

2001-07-18 Thread Paul A. Procacci
Hey all, I tried passing an argument to a php script that had a plus sign (+) in one of the arguments. Observe the following: sciptname http://altavista.com/sites/search/web?q=task+managementpg=qkl=XX As it turns out the argument gets split into two seperate arguments, but I would like to

[PHP] Re: Command line args HELP!!!

2001-07-18 Thread Paul A. Procacci
parameters. When called via the GET method, this will contain the query string. argc Contains the number of command line parameters passed to the script (if run on the command line). try'em Paul A. Procacci [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL P

[PHP] Re: php/mysql ecommerce solution

2001-07-18 Thread Paul A. Procacci
I agree with Chris. The Exchange Project has been one of my personal favorites as well. www.theexchangeproject.org :) Duane Douglas wrote: hi gang! i'm looking for a php/mysql ecommerce solution. i want something that is ready made and fully customizable. i'm looking at phpShop:

[PHP] Re: OT Math Question

2001-07-18 Thread Paul A. Procacci
Well, If I'm right. The total number of posible combinations in the NJ state lottery, assuming there are, say, 56 numbers is var total = 56; total*(total-1)*(total-2)*(total-3)*(total-4)*(total-5) == 23377273920:1 Now that assuming one number was pulled from the pot and the same number

[PHP] Re: How to stop a previous page being repeated ?

2001-07-18 Thread Paul A. Procacci
use javascript to check the histroy. If the document.history points to the file your at then redirect? :) Cn Yeong wrote: How do I stop a previous page being repeated when the user hits their back button on the browser? Is PHP can do it?