Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Detect The Users Operating System Using PHP


Is it possible to detect a users operating system using PHP or is this
something for Javascript? I ask because I am trying getting some bugs
with a minor javascript script that is generating bugs when run using
IE on the Mac. The javascript, although a fancy feature, isnt all that
important to the page so Im just going to disable it from the server
for Mac users (sorry guys), at least until I figure out the way it will
display on the Mac.

I havent yet tested it in non-IE browsers (Firefox, Opera etc) on the
Mac. Can I also find out what browser software the Mac user is using.
If it works in other Mac browsers I can simply just disable it for IE
Mac users.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
How Can I Get The Operating System Through $HTTP_USER_AGENT
I was wondering how I can get the operating sytem with $HTTP_USER_AGENT? I saw in a different post that to get the borwser you do $HTTP_USER_AGENT (browser). So would it be $HTTP_USER_AGENT (os) or something similar for the OS?

Get Server Operating System
1. is there to know a way to know what operating system the server currently executing a php file is running? how do i do that in php?

2. how do i get the path to the mysql/bin folder of that server.. because for example i want to use this code in my php file:

shell_exec("mysqldump --allow-keywords --opt -uroot mydb > mydump.sql")
but i need to specify the path to mysqldump

PHP Function To Detect The Users Connection Type
I know its out there I've seen it before but for the life of me i can't remember it, it returns a value like

corperate
residental
proxy (aol)
Other

off the ip and its a built in function, anyone know its name so i can lookit up?

How To Detect That A System(client) Is Idle In PHP
I want to know that how can php script detect that a client is idle for few minutes(meens keyboard and mouse is not in use)

EyeOS : Opensource Web Based Operating System Based On "php"
EyeOS is a Opensource web based operating system based on "php".

try demo here

http://eyeos.info/eyeOS/

Users File System
I have being trying fo find the best solution for this problem for
2 days now and I am not able to find a solution.I need help.

I explain the problem:

A customer needs a system so that when a user is registered in his web,
automatically he is assigned with a folder or folders and permissions
to these folders (basicaly upload, download).Then users and permissions
have to be editable in an easy way.

Example of needings:

He has two groups (costumers and workers).

The first group(costumers) .Each user of the group only sees his own
folder and has download and upload privileges by default.

The second group (workers):Each user sees his own folder with upload
and download privileges by default and all the members of the group
also see a common folder with only privileges download by default

The environment is: The customer uses a local machine with Windows
Xp/Apache2 to host the server and I´m free to install any application.

After searching a lot of information I have tried a lot of things:

1- Ftp server, using the ftp_site function to achieve the desired
actions.With this I have a lot of problems:

- I haven´t found a ftp server that has the site commands I need to
achieve the action of adding users, assign them a set of folders and
assign the permissions over these folders to the user .

2- Ftp server, with odbc support for user management.For example
Serv-u.This would be a nice solution so I would handle serv-u user
permissions using directly php and mysql.But the problem is: I haven´t
been able to configure this server with mysql odbc I have also tried
blackmoon and others.

Also there´s the problem of software and platform dependancy and the
big headache of the no standardization .What would happen if the
costumer wants to change his local server to a remote server?.

Login System Using Linux Users
I'm running a linux system I would like to create a login system based
upon the users and passwd of my linux box how could I do this ?

System(); Command Not Working On Remote System. Windows.
My server is a windows machine, on the same domain as python(also a windows machine). Apache is running as a service as an administrator. This is a test only environment to whom it may concern(I hate people telling me how insecure my system is) I'm just trying to run:

$last_line = exec('dir pythonc$', $retval, $g);
print_r($retval);
echo '<br>'.$g.'<br>';
echo '$last_line= '.$last_line.'<br>';
Which outputs:

Array ( )
1
$last_line=

The command from the command line works fine. And apache can access directories that only administrators can access on the local machine.

CMS - Blocking Users From Certain Users
I'm created a content managment system and the only thing I can completed is a login script (most important) and how to use sessions. Right know, how do you make something that you can add a few users, give permissions like he is allowed to add news and reviews but not features, etc? Would I add something on the each page for inserting to see if they have such permissions?

OS Detect
would it be possible to detect the client's OS system with php?
i don't need much detail, only if its a Windows, a linux or a macintosh
system.

How To Detect Bug ?
how i know my site got how many bugs? is it any technique to find it out?

Php To Detect Javascript
Can you tell me how to detect javascript in our browser with php, because
sometime we need javascript in our page, like in TINYMCE, if our browser doesn't support javascript it means TINYMCE cannot be accessed.

Php To Detect Redirects
is it possible to have a php script where u could enter a url and figure out where it is being redirected too..

i.e.
http://g.msn.com/0US!s8.559_6217/61.a70/2??cm=InfoPaneBigPic

redirects to some auto.msn.com site how can i do this with a php script.

Detect MAC Address With PHP
Is there some way can detect MAC address with PHP? any help will be
appreciate.

Flash Detect
Can php load an image in place of a flash movie for users without the flash plugin?

Can Php Detect Hardware On A PC?
I was considering developing a hardware management program and was wanting to know if PHP can scan machines connected to a server for what hardware is contained within their PC?

Detect Javascript
Is it possible to detect wether a user has enable javascript is his
browser or not within PHP?

How To Detect Proxy?
What's a good way to detect if an ip is a proxy ?

Detect Refresh?
I'm making a game and I want to be able to detect if a user refreshes, and if they do, I want to reset the score to 0. I know how to reset the score, I just need to know if you can somehow detect if they refreshed the page.

Detect Logoff
How can i detect if a user has logged off with php/mysql because they will more than likely just close the browsers.

How Do I Use Php To Detect Whitespace ?
How do i use php to detect whitespace and convert text before whitespace and text after whitespace into array ? for e.g. when someone types "hello world" into a text box, it inserts the words "hello" and "world" into an array. so array[0] will be "hello" and array[1] will be "world".

How Can I Detect SMTP?
How can I detect SMTP? I have a php script that wont send out an email, no errors, so I think the SMTP is disabled? I'm not sure how that part works. This script isn't for me, and I don't know if there server will have the capabilities to send php email. So, before I tell php to send the email, I want to see if it can send an email.

So I have a few questions:

1.) How can I detect SMTP settings?
2.) How do I enable or install SMTP?
3.) Is there a way to turn SMTP on from a PHP script?

Detect Proxy Typ
Is there any way to detect the type of proxy Transparent, Anonymouse, High Anonimity or No Proxy.

Detect Character Encoding?
My Problem is I want to build my own small web interface. works fine with imap_ functions so far. But now i got problems with Mails coming from MS Outlook - they are UTF-7 or UTF-8 encoded.

I don't know how to find out how they are encoded?

Second Problem: Got a character Sequence in the subject looking like that:

Ihre Anfrage: =?iso-8859-1?Q?minpoll=20timelimit=20wie=20gro=DF=3F?=

Don't know what to do with that.

Perhaps someone could drop some info on encoding.

Detect Internet Speed With Php
Is it possible to know the internet speed of the visitors with php?

How To Detect And Delete A String Like This
Someone filled out a comment form to me with the following string
within the message:

#file=E:utilxr32Projectswww42t35Href.txt

The comments are stored in a mysql database
When php generates the page to display this field, it looks like this:

#file=E:utilxr32Projectswww42t35Href.txt

If I use something like
DELETE FROM database where lower(`comments`) like "%file=
%"

or if i try
DELETE FROM database where lower(`comments`) like "%\%"

it fails to detect the string.

How do I detect and rid this kind of posting?

Detect Serialized Variable ?
How can I check if a variable has been serialized ? I store several variables, of which some are (small) array, inside session. Array is serialized prior to storing in session. So when I read my session on another page I need to pull out original variables. As I loop through $_SESSION I would like to know which variable has been serialized to properly unserialize it. What is the easiest way?

Detect Browser Resolution.....
I am doing a script which to detect the user's browser resolution, can php do it?

How To Detect FireFox In Php Language?
i have this line in javascript Code:

if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) {}
else {}

and i want to use PHP if statement to detect browser to act accordingly.

Detect Random Answers
I have a PHP/MySQL quiz/questionnaire and want to detect random or missing responses.

Something like "SELECT IF {MORE THAN 3 ZEROS IN A ROW} OR {MORE THAN 5 'YES' IN A ROW}"

Any suggestions? Would doing this at the SQL query be most efficient?

Detect If A File Exists
How can I do a code that would ask PHP to detect if a file exists, and if it doesn't?

How Do Xml Parsers Detect Bad Characters?
2 years ago I asked, on this newsgroup, how to weed out non-UTF-8
characters from my RSS feed. I was told that I could not do so with
certainty, but I could try various tricks that would give me maybe
99%. I notice, however, that XML parsers seem to have 100% certainty
when they find bad characters. Consider the last error that I get from
this validation service:

What PHP code would give me this kind of 100% certainty? It seems to
me that, whatever the XML parsers do to determine a bad character, I
could also do, so as to make sure no such character makes it into my
feed.

Howto: Detect Encodings?
Here is a nice code to detect utf-8
<http://in2.php.net/utf8_encode#39986> But, I couldn't find out the
logic behind the script. If anyone knows that please share.

Particularly I would like to detect other encodings too. So, I would
like to know the logic.

For example these texts are in TSCII encoding (for Tamil):

MySQL- Detect Values
I am trying to make a system that detects wherther an entry has been made in the database containing a certain value.

More accurately, the system checks the database of usernames to see if the username the user entered in the sign up page has been used. If not, it allows the name to be used, if so, it does not allow it to be used.

The database stores the information in the cells: username, password, and userID (an auto-incrementing cell) The database is called usernames. What I am asking for is the code I would use to do the username check. Basically:

if (username has been used) {
     don't allow user to sign up, and present an error message
} else {
     allow user to sign up, and complete the registration process
}

Detect Word From A String
I called a query from database which will display a line of string e.g id1id2id3id4.... How do i detect if the string contain the word 'id4' for example. I'm using PHP 4.3.10

Detect Mouse Click
Is it possible to detect where on a page someone clicks with PHP? If so, can you point me in the right direction?

Javascript Version Detect
I don't want to browser sniff ... just browser "whiff".

Is there a way to determine what version of javascript is supported by a users browser?

I'm trying to say "if you have javascript 1.5 or better, cool, otherwise we're in trouble".

Detect Ended Session
I have a standard login page. If a user leaves the page for a while and then comes back they try and browse and are redirected to this page. This is confusing them . When a user's session expires I need to tell them that they have been logged out due to inactivity for n minutes.

However, I do not want to put this on the page before they have logged in. What is left of a session when it expires? Is it completely destroyed by PHP? Is there any way of making a distinction between a session that was never created and one which has expired?

My session looks something like this:

Array
(
    [user_id] => 99999999
    [permission] => 45
)

Detect User_type Login
I'm working on my log system for my office use... so my purpose is  just wanna seek advise/guide from php guru's here... the best/proper way to code this.... Okay my problem is here... how to differentiate user level after the user success logging into the system....because what I'm working is now..I have  3 different page depends on user type after successing login...let's say I have this type of record in my dtbase.. Code:

Detect Failed Select
I want to insert a new mime type if the mime type does not exist or I want to get the existing mime type ID. I know this is a common problem, but I can't figure it out. I've tried using mysql_num_rows, but it causes an error.

$mime_type = mysql_escape_string($_FILES['file']['type']);

$result = mysql_query("SELECT id, mime_type FROM mime_types WHERE mime_type = $mime_type");

if( !$result )
{
  mysql_query("INSERT INTO mime_types (id, mime_type) VALUES ('', '$mime_type')");
  $mime_type_id = mysql_insert_id();
}
else
{
  $row = mysql_fetch_assoc($result);
  $mime_type_id = $row['id'];
}

Detect That Session In Broken
Here is what I want to do - when the user uses the page the session is created. As soon as the user closes the page I want to catch that moment and perform last second things like committing data to DB, writing logs, etc. So how so I catch the fact that the user broke the session?

How To Detect If Clients Are Using A Proxy
I need to know if clients access my website directly or through a proxy. this is for security requirements.

I used a code like the following:

if($_SERVER["HTTP_X_FORWARDED_FOR"]||$_SERVER["HTTP_VIA"]||
$_SERVER["HTTP_CLIENT_IP"])
echo "proxy connection";
else
echo "direct connection";

However this worked only when accessing the website through http:// but when accessing it through https:// all variables $_SERVER["HTTP_X_FORWARDED_FOR"] and $_SERVER["HTTP_VIA"] and $_SERVER["HTTP_CLIENT_IP"] are empty

I used a public proxy server for testing. Its IP is 200.65.127.163 port is 80

It supports both normal http and secured http connections.

N.b: I know there are the highly anonymous proxies that normally can't be detected but at least I need to detect the normal anonymous proxies when opening my website through ssl.

How To Detect Whether Human Or Robot Visitor?
I coded up a hit counter, then extended it to see who was reading my
blog, by matching IP. The problem is that I am swamped by crawlers.

How can I detect a human, or a crawler? If I can handle one, I can
negate it for the other.

Should I somehow user $_SERVER['USER_AGENT'] ? or something else?

Detect Provider And Resolution For Webstats?
I'm building my own webstats, and I was wondering if I could detect
following things:

the screeen resolution (although I believe this is only to be found out
through javascript, this sucks, since my stats have to be collected before
any output is made) the provider (through the IP?)

Detect Http Or Https In Script
I need to include some javascript in my pages to display a "trusted"
logo. I need one script if its an https page and a different one if its
an http page. All the pages are created dynamically by the oscommerce
scripts. How can I detect whether the page is to be delivered over http
or https so I can choose which to display?

Looking For A Good Way To Detect Server Platform
I'm currently writing a wee library tool in PHP. It generates a few
(actually a lot) of temporary files and directories, so I need to setup
some garbage collection. I can do this a lot more effeciently from the
shell on a POSIX system than writing lots of PHP code, but the former wont
to work if someone tries to run it on a different platform.

(If on Unix/Linux/... I can use 'at now' to sperate the process group, and
use 'find' to delete the aged files).

Anybody got any hot tips on how to detect the platform? (I guess I could
search the $PATH for 'at' and 'find' but I was looking for a quicker fix)

Detect Change Of Remote Page
i have some links on my site, i need to be absolutely sure that the
html has not been modified, even one character. i would rather not
rely on http headers, just the html (so it is not dependant on the
webserver). should i make a database to actually mirror the page, and
then check against my copy? any better ideas? :)

How To Detect Which Link Was Used To POST A Form
Have a PHP script that reloads itself into one of two modes, depending on which text link you click on. Right now it's done using the GET method, by appending different variables to the URLs, but I'd like to convert it to POST if that's not too hard.

Dates - Detect Groups Of 7 Days
i'm developing a reservation system for a vacation house. the owner has specified that the place can only be rented by the week, check-in is on saturday, then check out must be on some following saturday (doesn't matter how many weeks as long as check-out is on a saturday). i tried to figure out if the user has selected spans of seven days (rented it for 1,2,3 weeks etc...) this way: PHP Code:


Copyright © 2005-08 www.BigResource.com, All rights reserved