Re: [PHP] Get remote IP ot Host

2001-03-05 Thread Michael Meinl


 I have problem with "REMOTE_ADDR" or "REMOTE_DOST".
 
 "REMOTE_ADDR" always return me 127.0.0.1 (localhost) !!!
 The php program is on remote server ( not locally ) - www.f2s.com.
 
 How can I get IP or HOST of the visitor ?

The problem might be, there is a proxy / redirection on the same server.

You might try HTTP_X_FORWARDED_FOR. ( or so... try test.php3 for exact
info... )


-- 
Krankenhaus Martha-Maria Nuernberg
EDV-Organisation
Michael Meinl
Tel: 0911/959-1493 -1493
Fax: 0911/959-1412 -1422
---
Linux - The choice of the GNU generation

-- 
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] PHP and printing

2001-02-28 Thread Michael Meinl

   Hi, I'm working with php4 and mysql on a suse 6.3
   I made a program for an ISP that creates accounts, clients,
   payments, invoices.
 Everymonth they need to print like a quote (a list of every non paid
 thing) its ok, I could do that, I mean in the screen... Is it possible
 to print it in a printer automatically? I mean.. I dont want to view
 it on the screen.. I want it to print all the records alone
 Can you help me???
e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

Well, you could simply use a shell script

use something like

mylsq -psomepassword dbname -H -e "SQL-QUERY" | html2ps | lpr

-H puts out HTML-format

-e executes the query in ""

html2ps formats the output to postscript, which is printed via lpr...

works fine with me...

you could simply include this in your crontab

-- 
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]