Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Nichel
Try... $_SERVER['HTTP_REFERER'] John Taylor-Johnston wrote: The deal is my ISP does a redirect from www.delete.compcanlit.ca to www.delete.compcanlit.usherbrooke.ca. I'm trying to if statement the redirect. Again, I find no variable in phpinfo(). John -- By-Tor.com It's all about the Rush

Re: [PHP] Beginner examples?

2002-12-23 Thread Chris Rehm
John W. Holmes wrote: http://www.google.com/search?sourceid=navclientie=UTF-8oe=UTF-8q=php+ mysql+tutorial ---John W. Holmes... John, I am grateful for the suggestion and I will pass it along. I have already given some insight as to how to find tutorials on the web and the like. What I was

Re: [PHP] Problem with Include

2002-12-23 Thread sport4ever
It's PHP problem because I can include any number of files with other extensions. only PHP which I can not include more than one file at a page... maybe there is something wrong with php.ini notice that I faced with this problem just after I upgraded to (PHP 4.2.1), (Apache2), everything was

RE: [PHP] Beginner examples?

2002-12-23 Thread John W. Holmes
In that case, check out www.devshed.com www.phpbuilder.com www.zend.com www.webmonkey.com Those sites have very good tutorials on a variety of PHP topics. ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/

Re: [PHP] REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
What happened when you tried that? Nothing. Nothing showed. In fact nothing for getenv('REMOTE_HOST') in the else either. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] REMOTE_HOST

2002-12-23 Thread John Nichel
Did you try $_SERVER['HTTP_REFERER'] ? John Taylor-Johnston wrote: What happened when you tried that? Nothing. Nothing showed. In fact nothing for getenv('REMOTE_HOST') in the else either. -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
John, John, Nothing. echo $_SERVER['HTTP_REFERER'].'br'; echo getenv('REMOTE_HOST').'hr'; Try looking at: http://compcanlit.usherbrooke.ca/ or http://compcanlit.ca/ which will redirect to http://compcanlit.usherbrooke.ca/ I even made a link on a blank page on my desktop and from an email

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
But something does appear when you click on the links in this post, but not on a blank page nor from the server redirect?? Oh well. Any other avenues? I thought something would appear from a link from a blank .htm file to the site?? John John, John, Nothing. echo

RE: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John W. Holmes
REFERRER isn't always set, so that may be the problem. Try just a simple HTML page that has a link to a PHP page that echo's out $_SERVER['HTTP_REFERRER']. Does that work? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today.

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
Interestingly, the referred page displayed when you click on this link http://compcanlit.ca/ when referred to http://compcanlit.usherbrooke.ca/ is the same. So I can't detect the server redirect? Bummer? But something does appear when you click on the links in this post, but not on a blank

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
REFERRER isn't always set, so that may be the problem. Try just a simple HTML page that has a link to a PHP page that echo's out $_SERVER['HTTP_REFERRER']. Does that work? No. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Nichel
What do you get with this... echo ( pre\n ); print_r ( $_SERVER ); echo ( /pre\n ); John Taylor-Johnston wrote: But something does appear when you click on the links in this post, but not on a blank page nor from the server redirect?? Oh well. Any other avenues? I thought something would appear

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
What do you get with this... echo ( pre\n ); print_r ( $_SERVER ); echo ( /pre\n ); From a blank HTML page, I get: Array ( [DOCUMENT_ROOT] = /var/www/html2 [HTTP_ACCEPT] = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* [HTTP_ACCEPT_CHARSET] = iso-8859-1,*,utf-8

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
echo ( pre\n ); print_r ( $_SERVER ); echo ( /pre\n ); On the redirect from http://compcanlit.ca/, I get: Array ( [DOCUMENT_ROOT] = /var/www/html2 [HTTP_ACCEPT] = image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */* [HTTP_ACCEPT_CHARSET] = iso-8859-1,*,utf-8

Re: [PHP] Undefined Functions

2002-12-23 Thread Beauford.2002
Finally got it working, but I have no idea how. I rewrote the script changing a few if's and elseif's so there weren't as many, but still calling the functions from the if/else statements. The format of the new script is the same as the old one, and other than a few modifications, I still can't

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Nichel
Like John said, REFERER isn't always set, and that looks to be the case here. One thing I did notice is that the redirect comes thru on a different port. If this is consistant, you may be able to use this. John Taylor-Johnston wrote: echo ( pre\n ); print_r ( $_SERVER ); echo ( /pre\n );

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
[SERVER_PORT] = 80 Server port does not change. Will it do anything to change my php.ini? session.referer_check = It is set to nothing at the moment, copied and pasted. How do I check for the port number? My redirects come through: [REMOTE_PORT] = 1070 [REMOTE_PORT] = 1074 They are also

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Nichel
Well, that won't help then. I saw that REMOTE_PORT was different in your last two emails, but if it's ever changing I'm doing a little testing here on my end and have discovered that REFERER isn't set if the server is doing a redirect. I made a simple little two page script. The first

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Taylor-Johnston
John, CC: a copy of your next posts. I'll be back on Friday. Jingle Bells and all. Thanks for thinking about it. What about turning on: session.referer_check = Or soemthing else in php.ini John John Nichel wrote: Well, that won't help then. I saw that REMOTE_PORT was different in your last

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread Jason k Larson
You can't use REMOTE_PORT reliably for this purpose, it will always be different, until they get recycled by the server. How are you performing the redirect? via PHP, or maybe with Apache and a Rewrite rule or something? Jason k Larson John Taylor-Johnston wrote: [SERVER_PORT] = 80

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread Rasmus Lerdorf
Isn't the question about REMOTE_HOST? Why are you talking about referer stuff at all? The two have nothing to do with each other. REMOTE_HOST is the resolved version of REMOTE_ADDR and is rarely set as it is way too time consuming to do a reverse DNS lookup on each ip that connects to your web

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Nichel
All session.referer_check does is make sure that the referering page is from within your host, and from what I'm reading, it seems that HTTP_REFERER would have to contain something. Couldn't hurt to try, but I don't think it will help you achieve the desired results. John Taylor-Johnston

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Nichel
He's looking to see if there is a redirect. The thing I'm seeing is that if the redirect comes from a php header call, or a url rewrite from the server, nothing is set for REDIRECT_URL or HTTP_REFERER. This is the $_SERVER output I get on my machine from a url rewrite and php header Array (

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread Rasmus Lerdorf
Sure, but his phpinfo() does show REDIRECT_* vars as it is the server doing the redirect. An external redirect (HTTP Location header) is not going to show anything as it has nothing to do with the server. -Rasmus On Tue, 24 Dec 2002, John Nichel wrote: He's looking to see if there is a

Re: [PHP] Timing mySQL query time.

2002-12-23 Thread Noodle Snacks
Can I do that on the fly? Rasmus Lerdorf [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Why not just get the query times from the mysql general query log? On Tue, 24 Dec 2002, Noodle Snacks wrote: Is there a built in php function for mysql that I can use to

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread John Nichel
Is this something that can be turned on/off in the .ini file or via the webserver itself? Neither my test servers, nor the ISP which hosts my sites show any REDIRECT variables. They don't show HTTP_REFERER either, but I only expect to see that when a link is clicked from another page (I could

Re: [PHP] Re: REMOTE_HOST

2002-12-23 Thread Jason k Larson
I created a static link from my dev site to your referer2.php script, and your phpinfo listed a HTTP_REFERER as expected. Jason k Larson John Nichel wrote: Is this something that can be turned on/off in the .ini file or via the webserver itself? Neither my test servers, nor the ISP which

<    1   2