How is it possible to find the processor id of the current web
connection that a user has made, so that it can be displayed onto the
page.
is the "PID" that is assigned to each process item, (from doing ps
-ax) would display them all, but not sure how to display the current
one using php.
I know there is a way of doing it with PERL but not sure if there is
with PHP.
Any replies would be appreciated. 10 5033
rob wrote: How is it possible to find the processor id of the current web connection that a user has made, so that it can be displayed onto the page.
is the "PID" that is assigned to each process item, (from doing ps -ax) would display them all, but not sure how to display the current one using php.
I know there is a way of doing it with PERL but not sure if there is with PHP.
Any replies would be appreciated. http://dk.php.net/manual/en/function.getmypid.php
--
MVH Jeppe Uhd - NX
rob wrote: How is it possible to find the processor id of the current web connection that a user has made, so that it can be displayed onto the page.
is the "PID" that is assigned to each process item, (from doing ps -ax) would display them all, but not sure how to display the current one using php.
I know there is a way of doing it with PERL but not sure if there is with PHP.
It doesn't look like it. phpinfo() tells me nothing. What do you want it
for? You have to bear in mind that it may only be valid for a single
page load as the next request may be sent to a fresh apache child.
> It doesn't look like it. phpinfo() tells me nothing. What do you want it for? You have to bear in mind that it may only be valid for a single page load as the next request may be sent to a fresh apache child.
I want it for creating a "session id" unique to that user, based on
the time the pid was issues and the pid itself, so that the session id
can be as small a value as possible but still unique.
rob wrote: It doesn't look like it. phpinfo() tells me nothing. What do you want it for? You have to bear in mind that it may only be valid for a single page load as the next request may be sent to a fresh apache child. I want it for creating a "session id" unique to that user, based on the time the pid was issues and the pid itself, so that the session id can be as small a value as possible but still unique.
In that case why not use sessions? If you use session_start() at the top
of your pages then a unique session id will be gewnerated for you.
rob wrote: I want it for creating a "session id" unique to that user, based on the time the pid was issues and the pid itself, so that the session id can be as small a value as possible but still unique.
You can still create such an ID using a more static parameter - such as the
user's IP address. I've done this before, created a unique identifying
string for each visiting user by crypt()-ing the IP address using the
person's browser identifier as seed. Then chuck that into a database and as
soon as the user returns from the same IP using the same browser, you'll
know they've been there before because the same encrypted string will be
generated again and you can check for its existence in the database. Or
easier - use sessions =)
Albe
-- http://www.ninja.up.ac.za
> In that case why not use sessions? If you use session_start() at the top of your pages then a unique session id will be gewnerated for you.
I am trying another, shorter method. session id's are too long. And
want to be able to find out the pid for a new method.
> You can still create such an ID using a more static parameter - such as the user's IP address. I've done this before, created a unique identifying string for each visiting user by crypt()-ing the IP address using the person's browser identifier as seed. Then chuck that into a database and as soon as the user returns from the same IP using the same browser, you'll know they've been there before because the same encrypted string will be generated again and you can check for its existence in the database. Or easier - use sessions =)
Albe
This still has possible problems, what if you are going through a
caching server, or you are sharing an IP with someone with the same
browser version.
Doing it the way with a pid is a guarenteed method, relying on an IP
or browser agent can have flaws. So really just want to know if it is
possible to get the pid, anyone know?
On 24 Mar 2004 00:51:57 -0800, ro*@cdli.co.uk (rob) wrote: In that case why not use sessions? If you use session_start() at the top of your pages then a unique session id will be gewnerated for you.
I am trying another, shorter method. session id's are too long. And want to be able to find out the pid for a new method.
Too long for what?
--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
getmypid();
as simple as that This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ola Natvig |
last post by:
Hi all
I'm working with a long running, threaded server which serves HTTP
requests with content which are passed through a XSLT processor. The
XSLT processor I'm using is the Pyana processor.
...
|
by: Amit Dedhia |
last post by:
Hi
I am developing a Dot net application (involving image processing) on
a uni processor. It works well on my machine. I then take all my code
on a multi processor, build and run the application...
|
by: dba_db2 at nospam gmx.net |
last post by:
We have got a brand new mutltiprocessor machine
IBM pseries server with 2 processors.
Now we want to buy a IBM DB2 license for this
box.
Does anyone know whether it is possible to
buy a single...
|
by: Jeff Mitchell |
last post by:
I have a logging application that records various performance metrics into a database every 5 minutes, and to this I'd like to add a performace counter that shows the processor usage in a manner akin...
|
by: kaiteriteri |
last post by:
I have a time-consuming VB.net application that i'd like to thread over
2 processors (that's all i've got in my machine!) and, hopefully, get it
done in
half the time. On running, the application...
|
by: Michel Meex |
last post by:
Hello,
I have an application, that has been running on a single processor server
for more then a year without any problems. Now I'm migrating to a dual
processor server, and I'm experiencing...
|
by: Michel Meex |
last post by:
Hello,
I have an application, that has been running on a single processor server
for more then a year without any problems. Now I'm migrating to a dual
processor server, and I'm experiencing...
|
by: sunil |
last post by:
Dear All,
I have created a .Net service in 2.0 and running it on a machine that
has a Quad Processor.
It is failing with the following error.
"Error 1053: The service did not respond to the start...
|
by: nano2k |
last post by:
Hi
I need to protect my application in a way. Just a "soft" protection,
not a very strong one.
So, using WMI I get the processor ID and compare it against a key.
Protection works well, until...
|
by: broeisi |
last post by:
Hello,
Is there a way in C to get information at runtime if a processor is 32
or 64 bit?
Cheers,
Broeisi
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
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,...
|
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,...
| |