Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP equivalent of some JS-functions 1

Status
Not open for further replies.

aspx

Programmer
Jul 25, 2002
52
BG
Hi!
I collect information about users visiting my web-site with JavaScript+PHP, but I'd like to use PHP only.
Are there any equivalents in PHP of the following JS-functions:
1. Screen.width, Screen.height;
2. Screen.colordepth;
3. Document.referer;
4. Document.url.

Thanx in advance for any help!
 
There are no equivalents for 1 or 2. Those can only be gained using client-side scripting -- PHP runs on the server.

$_SERVER['HTTP_REFERER'] holds the URL of the page which sent the browser to the current page. This is only available if the browser has been configured to report that information to the server.

There are a couple of ways to get the current URL, depending on exactly what you want. I refer you to the PHP online documentation on $_SERVER ( ______________________________________________________________________
TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top