Re: [PHP] Question
this class does just that: http://phpclasses.warmafrica.com/browse.html/package/514.html 08/04/2002 13:49:44, [EMAIL PROTECTED] a écrit: >At 08.04.2002 13:00, you wrote: >> >>How to convert or discover from IPadress country visitors on my web ? >> >>roman >You have to make a DNSLOOKUP >If you have a linux box (server setup) you can use >system("nslookup -timeout=3 -retry=1 ".$value) >where $value is the IP-Number. This gives you the >"real" name of the server your client asked from. >the you have to extract the national-code, and got your >country, or org, mil, com > >HTH Oliver > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Workaround for no cron?
hi you should try this free service http://www.webcron.org it is really great (supports authentication, stores resulting file...) and free, the site is in french though ! Regards _ Hassan El Forkani http://WarmAfrica.com EveryOne's Africa _ 08/04/2002 04:15:01, "Steve Werby" <[EMAIL PROTECTED]> a écrit: >"Leif K-Brooks" <[EMAIL PROTECTED]> wrote: >> I have to wait for my host to compile php as binary for cron to work with >> php, and a lot of things on my site depend on cron. > >It's not my favorite solution from a security standpoint, but you could call >the PHP scripts from cron using wget or lynx. wget even supports HTTP >authentication and I *think* lynx does as well so you can password protect >the scripts using .htaccess. And I'm assuming you have cron access since if >you don't, having your host install PHP as a CGI won't cure that. > >> Does anyone have some >> sort of code that I could put at the top of all my pages so when they get >> visited, it checks to see if a script has been executed yet this time >> petiod, and if not yet, it does? > >Better to teach a man to fish...? Either create a db entry or text file >entry with the timestamp of the last run of the scheduled script and have >your calling scripts check the timestamp to see if it's time to run. > >> Or any type of workaround for not having >> cron? Thanks! > >You just need access to a machine (can even be a Windows desktop) which can >launch a URL at a specified time or you just need someone who can do the >same via a cron job on one of their boxes. Hope that helps. > >-- >Steve Werby >President, Befriend Internet Services LLC >http://www.befriend.com/ > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to test ob_start("ob_gzhandler");
hi i'm testing the same thing under windows, the output is compressed but the browsers prompt me with a download window , it seems they do not support this compression...is this working under windows ??? 18/02/2002 15:15:32, "Rein Velt" <[EMAIL PROTECTED]> wrote: >Dear PHP coders, > >i am using ob_start("ob_gzhandler") to compress all html output. >Is there any way to check if the output is really compressed? (and how >much)? > >Thanks in advance, > >Rein Velt > > > >-- >PHP General Mailing List (http://www.php.net/) >To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] strange behaviour with output buffering
hi, i'm working on content management sytem entirely written in Object oriented PHP using templates i used output buffering to be able to send header calls in the middle of my classes i have noticed that performance has become "random" meaning that the same script could take from 1 up to 30 seconds in the same conditions, passing exactly the same parms. while trying to find a solution, i removed the ob_end_flush() call while keeping the ob_start() call at the beginning of the script and strangely speed of execution came back to normal. output buffering is still on i am not flushing it out the pages are generated just fine without freeing the buffer ?? i would like to know if anyone has had similr experiences with output buffering this behaviour occured on a windows and a linux box both with php 4.1.1 and pretty much the same php.ini settings Regards Hassan El Forkani http://WarmAfrica.com EveryOne's Africa _ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best way to get the remote IP address?
here is a piece o fcode that looks up user ip from env vars recursively 22/01/2002 04:57:50, Jimmy <[EMAIL PROTECTED]> wrote: >> either $HTTP_SERVER_VARS['REMOTE_ADDR'] or simply $REMOTE_ADDR (if you use >> $REMOTE_ADDR in functions make sure you do a global on it first) - I >> personally use $REMOTE_ADDR, but you should read the docs for details... > >using $REMOTE_ADDR directly is fine as long as the >"register_global" setting is off. > >otherwise, it's wiser to use getenv('REMOTE_ADDR') instead of >$REMOTE_ADDR directly. > >-- >Jimmy > >Failure doesn't mean you'll never make it. It just means it may take longer. > > >-- >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 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] How to resolve IP with PHP
hi, i think there is a function that does just that look for gethostbyaddr($ip) in the documentation beware of the implication on the ressources , this function performs a reverse dns lookup which can be time consuming regards 21/01/2002 08:20:48, Police Trainee <[EMAIL PROTECTED]> wrote: >Hello. Can anyone tell me how to resolve an IP into a >hostname? I've tried $REMOTE_HOST but all i get back >from it is the ip or blank. Is there another >environmental variable i need to use or do i have to >do something more complicated? > >thanks so much! >-mark > >__ >Do You Yahoo!? >Send FREE video emails in Yahoo! Mail! >http://promo.yahoo.com/videomail/ > >-- >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 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] HTTP_REFERER
hi reasons why it couldn't be set: the url was typed directly some browser don't send referer information other (like opera 5.12) send a wrong value you shouldn't rely on HTTP_REFERER too much regards hassan el forkani http://WarmAfrica.com 23/11/2001 11:55:04, Jordan Elver <[EMAIL PROTECTED]> wrote: >Hi, >I'm writing a 404 handler and in order to report the item that was requested >I was trying to get the value of HTTP_REFERER. But, it does seem to get set. >Does anyone know how to find thi value? Is there a reason why it would not >get set? > >TIA, > >Jord >-- >Jordan Elver >Web Developer >http://www.theinternetone.co.uk >Carpe Aptenodytes! (Seize the Penguins!) > >-- >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 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] Q:Why is my code returning this? Help?
why are you using stripslaches? 25/10/2001 00:41:45, Marcus James Christian <[EMAIL PROTECTED]> wrote: >Hello, > >As mainly a designer w/ HTML and JS php is usually just an end of site >add on to process forms and I LOVE php! > >I've been away from PHP coding for about a month and I can't figure out >what I'm forgetting here is partial of the form, the php handler, and >the final email I get. If you see some syntax I'm botching let me know >please. > > > >Title... >Mr. >Ms. >Mrs. > > > >*First Name: > >*Last Name: > >*Mailing Address: > > >*City, State, Zip: > >.. > >THE PHP HANDLER... > >Your form has been proccessed and sent to ... > >$to = "[EMAIL PROTECTED]" ; >$subject = "A Dale Commons web site visitor is requesting information!"; > >$message_raw = "My name is $fname, $lname >\r$r1a, $r2a, $r3a\r$r1b\rhere is my contact information:\r$title, >$fname, $lname, \r$m_address,\r$city_state_zip,\rPhone Number: >$phone\rFax: $fax\rThe best time to call is $time_to_call\rMy email >address is $e_address"; > >$message_stripped = stripslashes($message_raw); > >mail ($to, $subject, $message_stripped, "From: ><[EMAIL PROTECTED]>" ); >?> > >AND FINALLY THE SENSELESS EMAIL I GET AT THE END... > >My name is , > >, , >I am looking for a loved one. >here is my contact information: >, , , >, >, >Phone Number: >Fax: >The best time to call is >My email address is > >.. > > >What in the world? Did I forget everything PHP taught me? What the heck >are those weird commas from and I could swear a form element named >"xname" is called in php via $xname ??? > >Please let me know what you see, >-Marcus > >PS, I just ran phpinfo(); on my server and it looks like all the others >that work. > > >-- >Marcus James Christian UNLIMITED >Multimedia Internet Design >http://mjchristianunlimited.com > >Proudly presents the music of CHROMATICUS >at http://www.mp3.com/chromaticus >and http://chromaticus.com > > >-- >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 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]