473,322 Members | 1,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

does php 6 support $REMOTE_ADDR???

jon
I'm trying to make a page that only prints the page when it is acess
from one site only. I typed the code in and nothing is happening heres
the code

<?php
switch ($HTTP_REFERER)
{
case ("www.sentinelsolutionsinc.com/js/secret.html") : showme();
break;
case "http://www.sentinelsolutionsinc.com/js/secret2.php" : showme();
break;
case "http://www.sentinelsolutionsinc.com/js/scripts.html" : showme();
break;
case "http://www.sentinelsolutionsinc.com/js/mjokes.html" : showme();
break;
case "http://www.sentinelsolutionsinc.com/js/movies.html" : showme();
break;
default : print "<body onload=\"window.location='index.html'\">";
}

function showme()
{
**website here***
}
?>

Nov 25 '06 #1
2 1794
On 25 Nov 2006 13:21:38 -0800, "jon" <jm******@hotmail.comwrote:
>I'm trying to make a page that only prints the page when it is acess
from one site only. I typed the code in and nothing is happening heres
the code

<?php
switch ($HTTP_REFERER)
Don't multipost.

What are you expecting to set $HTTP_REFERER? That's not set in PHP 4 or 5 in
the normal configuration, let alone in PHP 6. Look up "register_globals".

PHP 6 removes the option for register_globals completely, forcing you to use
the method recommended for the past several years.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Nov 25 '06 #2
Try using the superglobal, $_SERVER['HTTP_REFERER']

On Nov 25, 1:49 pm, Andy Hassall <a...@andyh.co.ukwrote:
On 25 Nov 2006 13:21:38 -0800, "jon" <jmsha...@hotmail.comwrote:
I'm trying to make a page that only prints the page when it is acess
from one site only. I typed the code in and nothing is happening heres
the code
<?php
switch ($HTTP_REFERER) Don't multipost.

What are you expecting to set $HTTP_REFERER? That's not set in PHP 4 or 5 in
the normal configuration, let alone in PHP 6. Look up "register_globals".

PHP 6 removes the option for register_globals completely, forcing you to use
the method recommended for the past several years.

--
Andy Hassall :: a...@andyh.co.uk ::http://www.andyh.co.ukhttp://www.and....co.uk/space:: disk and FTP usage analysis tool
Nov 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Johnny | last post by:
Now I am running PHP in Apache on Windows platform, but I need to migrate it into linux and using IPv6 instead. So I want to know if PHP fully support IPv6. And how about the workload of this...
3
by: bawar | last post by:
I want to put a script on my site that shows how many users are online on my site. I found one, and that is shown below. It also shows a log with the IP-addresses of those visitors. Buuut... the...
7
by: deko | last post by:
Why is $_SERVER returning multiple IP Addresses? Actually, I'm not sure if it's $_SERVER -- or which if/else statement -- that's the problem, but what I'm getting as a value for $visip looks...
2
by: xarrisx | last post by:
I have a web server with a firewall. The problem is that when i use request.servervariables("remote_addr") the ip i get is my server's ip. Is there any other way to retrieve my visitor's ip? ...
7
by: Jason | last post by:
Hi, The javascript in my page is not working, itstead of alerting me the ip address, it alerts me with string "<!--#echo var="REMOTE_ADDR"-->". var ip = '<!--#echo var="REMOTE_ADDR"-->';...
3
by: hn | last post by:
I would like to get the visitor's ip address. Which one is the appropriate one to use: Request.ServerVariables("REMOTE_ADDR") or Request.UserHostAddress? Thanks in advance.
4
by: ojorus | last post by:
Hi. I have a problem when I use the $_SERVER. I'm testing a script, and the strange thing is that remote_addr returns an ip-address only sometimes, and not always. Why can that be? Are there any...
9
by: Markus | last post by:
Hi In cases where I need to store the session id and/or the remote host in a database I used to choose tinytext fields so far. Anyway the usual values for session ids are of 32 characters...
3
by: Frank Moyles | last post by:
What is the equivalent for retrieving server side variables? For example in PHP, one such predefined variable is: $_SERVER
2
by: Henry Stock | last post by:
I don't seem to understand how to use the value: Request.ServerVariables("remote_addr") I am trying to pass the ip address of a sending web client in the body of an email message. When I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.