473,608 Members | 2,689 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getenv variables question

I am trying to write a PHP action into my custom 404 error page that
will email me when someone tries to access a bad link. I can get it to
work and tell me the person's IP using <$ip = getenv ("REMOTE_ADDR") ;>,
the page referer using <$httpref = getenv ("HTTP_REFERER" ); > and the
time of the request using <$today = date("D M j Y g:i:s a T"); >

But what I'm having a problem with is finding the variable that will
tell me the name of the actual page, photo, link, etc. that they were
trying to access. I can't fix broken links when I don't know what they are.

Can anyone help me plug in the right variable to get this info?

Jul 16 '05 #1
0 2188

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

Similar topics

1
5029
by: Sims | last post by:
Hi, if i use... // php $info = getenv("HTTP_USER_AGENT"); // I noticed that Mozzila and Netscape <6(?) both use the same Agent. // so i was thinking of if (preg_match("/Mozilla/i", $info)) {
2
2723
by: Martoni | last post by:
Is there a variable to fetch with getenv that gives you the client host name. I can't find it in my docs so I suppose there isn't but it would be handy to be able to insert the "computer name" of the calling computer in some cases. (as my dev box is "Carnelian". I would like to do something like: $clientdev = getenv('HOST_NAME'); /M. -- Martin Skjldebrand Family site: http://www.skjoldebrand.org
0
1794
by: Xavier | last post by:
Greetings, While messing around with the "dl" module I ran into a segfault. *DO NOTE THAT THE FOLLOWING OCCURED ON 2 OF MY LINUX WORKSTATIONS* ------ # python -c 'import dl; a=dl.open("libc.so.6"); print a.call("getenv")' or while in the interpreter:
5
2766
by: Chad Paquette | last post by:
Hi, We have a legacy cgi app that's written in C. We are encountering an error when we try to retrieve a cgi environment variable. The variable we are getting contains a Base64 encoded distinguished name. If the distinguished is greater than 57 characters in length, a carriage return is appended to the 58th character. This of course causes the Base64 decoder to bomb because a carriage return is not a valid Base64 character. We are...
10
5661
by: Protoman | last post by:
What does getenv() do and why would you use it?
17
2986
by: Protoman | last post by:
Why does getenv work backwards? When I'm testing an env variable, I have to test if its NOT equal to, rather than equal to, to get the desired result. As evidenced by this simple piece of code: #include <iostream> #include <cstdlib> using namespace std; const char* cpu=getenv("PROCESSOR_ARCHITECTURE");
5
595
by: silrandir | last post by:
when attempting to call getenv() in global memory (c/c++), it constantly returns null, but when called in main, it properly reads the environment. is this expected behavior? sample code: #include <cstdlib> #include <stdio.h> #include <unistd.h> using namespace std;
4
2323
by: Yogi Watcher | last post by:
Hi, Recently I have observed some odd behavior of getenv and putenv function. I am developing some code that integrates with several other libraries. This program is not using MFC. It is plain C and C++ code. Some login and initialization function from one dll is setting an environment variable “MANUAL_LOGIN” to value “TRUE”. I tried three different cases and here is what I found:
1
3469
by: JR | last post by:
Does anyone know of any issues accessing environment variables in c++ using getenv() when the C++ is accessed through JNI?
0
8050
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
7987
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8472
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8324
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6805
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5471
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3954
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1574
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1318
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.