What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Simple PHP code help

Simple PHP code help
Author: Message:
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. Undecided  Simple PHP code help
Well since I'm totaly useless at PHP, how would I show this info:

HTTP_ACCEPT
HTTP_ACCEPT_ENCODING
HTTP_ACCEPT_LANGUAGE
HTTP_CONNECTION
HTTP_HOST
HTTP_USER_AGENT
REMOTE_ADDR
REMOTE_PORT
REQUEST_METHOD
REQUEST_URI
[Image: top.gif]
08-28-2005 01:39 AM
Profile PM Web Find Quote Report
KeyStorm
Elite Member
*****

Avatar
Inn-sewer-ants-pollie-sea

Posts: 2156
Reputation: 45
38 / Male / –
Joined: Jan 2003
RE: Simple PHP code help
code:
<?php
echo '<pre>';
print_r($_SERVER);
?>

Don't blame my HTML :refuck:

This will show all server and connection related env vars. If you only want to show some of them do as many

echo $_SERVER['NAME_OF_KEY']."\n";

as you like instead of the print_r().
08-28-2005 01:57 AM
Profile E-Mail PM Web Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. RE: Simple PHP code help
Thanks, now is it possible to get:

HTTP_FORWARDED
HTTP_X_FORWARDED_FOR
HTTP_VIA
HTTP_XROXY_CONNECTION
HTTP_PROXY_CONNECTION
HTTP_USERAGENT_VIA
[Image: top.gif]
08-30-2005 01:41 AM
Profile PM Web Find Quote Report
Jhrono
Veteran Member
*****


Posts: 1791
Reputation: 25
33 / Male / Flag
Joined: Jun 2004
RE: Simple PHP code help
I think it's the same thing...do this php code :
code:
<?php
echo "<pre>";
print_r get_defined_vars();
?>

To see what info you can show with

$_Server['X'], where X is any of the variables pre defined, showed in the php code..
08-30-2005 01:46 AM
Profile E-Mail PM Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. RE: Simple PHP code help
Ahhh ok, I thought

HTTP_FORWARDED
HTTP_X_FORWARDED_FOR
HTTP_VIA
HTTP_XROXY_CONNECTION
HTTP_PROXY_CONNECTION
HTTP_USERAGENT_VIA

Were only for CGI, but I guess it works for PHP too.
[Image: top.gif]
08-30-2005 01:49 AM
Profile PM Web Find Quote Report
fluffy_lobster
Veteran Member
*****

Avatar
Posts: -2

Posts: 1391
Reputation: 23
36 / Male / Flag
Joined: Nov 2002
RE: Simple PHP code help
I presume you mean perl. PHP is a form of CGI and as it performs the same workflow stage as perl yes it can do all the same things.

Now somebody's going to come and yell at me since PHP doesn't have to be a webserver module :P
08-30-2005 12:19 PM
Profile E-Mail PM Web Find Quote Report
Concord Dawn
Veteran Member
*****

Avatar
This is a loopy fruit.

Posts: 1203
Reputation: 16
34 / Male / –
Joined: Feb 2004
RE: Simple PHP code help
quote:
Originally posted by fluffy_lobster
I presume you mean perl. PHP is a form of CGI and as it performs the same workflow stage as perl yes it can do all the same things.

Now somebody's going to come and yell at me since PHP doesn't have to be a webserver module :P

* Concord Dawn yells at fluffy_lobster :refuck:

But yes, you are correct. As far as I know, any form of server side scripting (Perl, PHP, ASP, etc) can get any of those variables. All it boils down to is preference of coding language.

Correct me if I'm wrong
[Image: 7.png]
08-30-2005 02:13 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On