|
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)) {
|
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
|
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:
|
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...
|
by: Protoman |
last post by:
What does getenv() do and why would you use it?
|
|
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");
|
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;
|
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:
|
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?
|
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...
|
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,...
|
|
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...
|
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...
|
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...
|
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();...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
|
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...
|