473,804 Members | 3,399 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Extracting Information

Does anyone know where I should start with this. Im trying to extract the
information in:
$_SERVER['HTTP_USER_AGEN T'

But I dont know how to get the information out? What functions should I be
looking at. I want to get the OS, Browser, IP etc..

Thanks
Hayden Kirk
Jul 17 '05 #1
10 1995
Maybe try

print_r($_SERVE R);

Jay

Hayden Kirk wrote:
Does anyone know where I should start with this. Im trying to extract the
information in:
$_SERVER['HTTP_USER_AGEN T'

But I dont know how to get the information out? What functions should I be
looking at. I want to get the OS, Browser, IP etc..

Thanks
Hayden Kirk


Jul 17 '05 #2
I mean like splitting it up into sections, like an $OS string, $user_agent
string, $version string etc... Using it to store in a database to monitor
which versions of browsers and OS's come to our site,
Thanks
Hayden Kirk

"Jay Moore" <ad*****@isp.tl d> wrote in message
news:7j******** **********@twis ter.rdc-kc.rr.com...
Maybe try

print_r($_SERVE R);

Jay

Hayden Kirk wrote:
Does anyone know where I should start with this. Im trying to extract the information in:
$_SERVER['HTTP_USER_AGEN T'

But I dont know how to get the information out? What functions should I be looking at. I want to get the OS, Browser, IP etc..

Thanks
Hayden Kirk

Jul 17 '05 #3
Use the get_browser() function.

See http://www.php.net/manual/en/function.get-browser.php.

Uzytkownik "Hayden Kirk" <sp**@spam.co m> napisal w wiadomosci
news:Jh******** ***********@new s02.tsnz.net...
Does anyone know where I should start with this. Im trying to extract the
information in:
$_SERVER['HTTP_USER_AGEN T'

But I dont know how to get the information out? What functions should I be
looking at. I want to get the OS, Browser, IP etc..

Thanks
Hayden Kirk

Jul 17 '05 #4
Without using that function :P

Thanks,
Hayden Kirk

"Chung Leong" <ch***********@ hotmail.com> wrote in message
news:K4******** ************@co mcast.com...
Use the get_browser() function.

See http://www.php.net/manual/en/function.get-browser.php.

Uzytkownik "Hayden Kirk" <sp**@spam.co m> napisal w wiadomosci
news:Jh******** ***********@new s02.tsnz.net...
Does anyone know where I should start with this. Im trying to extract the information in:
$_SERVER['HTTP_USER_AGEN T'

But I dont know how to get the information out? What functions should I be looking at. I want to get the OS, Browser, IP etc..

Thanks
Hayden Kirk


Jul 17 '05 #5
Yeah, good luck with that since all browsers output their information
differently. :(

-Jay

Hayden Kirk wrote:
I mean like splitting it up into sections, like an $OS string, $user_agent
string, $version string etc... Using it to store in a database to monitor
which versions of browsers and OS's come to our site,
Thanks
Hayden Kirk

"Jay Moore" <ad*****@isp.tl d> wrote in message
news:7j******** **********@twis ter.rdc-kc.rr.com...
Maybe try

print_r($_SER VER);

Jay

Hayden Kirk wrote:
Does anyone know where I should start with this. Im trying to extract
the
informatio n in:
$_SERVER['HTTP_USER_AGEN T'

But I dont know how to get the information out? What functions should I
be
looking at. I want to get the OS, Browser, IP etc..

Thanks
Hayden Kirk



Jul 17 '05 #6
Hayden Kirk wrote:
Without using that function :P


find a list UA strings of all the browsers you anticipate will access
your website. Assume or ensure that anything that makes http requests
from your site will will not spoof this HTTP UA header. Then buy a big
bag of coffe, take a few weeks off work, and get a copy of "Mastering
Regular Expressions" from oreileys.

Jul 17 '05 #7
[Top-post fixed. Please don't top-post]

"Hayden Kirk" <sp**@spam.co m> wrote in message news:<aD******* ************@ne ws02.tsnz.net>. ..
"Chung Leong" <ch***********@ hotmail.com> wrote in message
news:K4******** ************@co mcast.com...
Use the get_browser() function.

See http://www.php.net/manual/en/function.get-browser.php.

Without using that function :P

Read the user notes carefully. It has the link to
<http://phpsniff.source forge.net/>
--
http://www.sendmetoindia.com - Send Me to India!
Email: rrjanbiah-at-Y!com
Jul 17 '05 #8
Well, there isn't a way. The user agent string is a complete mess. You can't
get what you want by parsing it.

Uzytkownik "Hayden Kirk" <sp**@spam.co m> napisal w wiadomosci
news:aD******** ***********@new s02.tsnz.net...
Without using that function :P

Thanks,
Hayden Kirk

"Chung Leong" <ch***********@ hotmail.com> wrote in message
news:K4******** ************@co mcast.com...
Use the get_browser() function.

See http://www.php.net/manual/en/function.get-browser.php.

Uzytkownik "Hayden Kirk" <sp**@spam.co m> napisal w wiadomosci
news:Jh******** ***********@new s02.tsnz.net...
Does anyone know where I should start with this. Im trying to extract the information in:
$_SERVER['HTTP_USER_AGEN T'

But I dont know how to get the information out? What functions should
I
be looking at. I want to get the OS, Browser, IP etc..

Thanks
Hayden Kirk



Jul 17 '05 #9
What about something with regular expressions?

There must be a way if there is that sniff php script...

"Chung Leong" <ch***********@ hotmail.com> wrote in message
news:bv******** ************@co mcast.com...
Well, there isn't a way. The user agent string is a complete mess. You can't get what you want by parsing it.

Uzytkownik "Hayden Kirk" <sp**@spam.co m> napisal w wiadomosci
news:aD******** ***********@new s02.tsnz.net...
Without using that function :P

Thanks,
Hayden Kirk

"Chung Leong" <ch***********@ hotmail.com> wrote in message
news:K4******** ************@co mcast.com...
Use the get_browser() function.

See http://www.php.net/manual/en/function.get-browser.php.

Uzytkownik "Hayden Kirk" <sp**@spam.co m> napisal w wiadomosci
news:Jh******** ***********@new s02.tsnz.net...
> Does anyone know where I should start with this. Im trying to
extract the
> information in:
> $_SERVER['HTTP_USER_AGEN T'
>
> But I dont know how to get the information out? What functions
should I
be
> looking at. I want to get the OS, Browser, IP etc..
>
> Thanks
> Hayden Kirk
>
>



Jul 17 '05 #10

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

Similar topics

0
2947
by: Gnaneshwar Babu | last post by:
Hi I am facing a problem with extracting event logs of win32 to a file. Am using the following code to extract eventlogs to file use Win32::EventLog; $handle=Win32::EventLog->new("System", $ENV{ComputerName}) or die "Can't open Application EventLog\n"; $handle->GetNumber($recs) or die "Can't get number of EventLog records\n";
2
1352
by: Shawn | last post by:
I have an XML file that contains nodes and I'm having no problem extracting the information using ASP. However I can't seem to get the ID number from the deliverrequest node from the example below. Driving me crazy.. any help would be appreciated. Thanks <!DOCTYPE xiamSMS SYSTEM "Message.dtd"> <xiam> <deliverRequest id="10234690"> ''' Need to retrieve this number using ASP <to>test</to>
5
2184
by: Astra | last post by:
Hi All Is there an ASP way of extracting the height and width of a swf file so that I can specify these dims when adding the whole OBJECT code to the web page? Thanks Robbie
1
17195
by: v0lcan0 | last post by:
Any help on extracting the time part from the datetime field in SQL database. even though i had entered only the time part in the database when i extract the field it gives me only the date part. i’m using Vb.net datagrid as a front end. any assistance appreciated!! :?: --
2
2640
by: Chris Belcher | last post by:
First some background... The database tracks Action Items assigned to a group of 20 or so managers. Once the assignment is created it is then emailed to each of the managers that are included in the scope of the assignment. Among the functions that it provides is the ability to embed the source documents in the database using OLE. The user has requested the ability to forward the source document with the email. The embedded documents...
0
1246
by: k_nil | last post by:
Hi, I have created a self extracting exe. the exe will extract an exe and a txt file on the machine. I wana launch the exe as soon as the extraction happens. how could i do this? any information or links will be highly appreciated. I am creating self extracting exe using visual interdev.
1
1466
by: Mark Jones | last post by:
Can anyone point me towards information/.net components that can be used for text extraction and pattern recognition? In particular, I am interested in working with a screenshot and extracting text and identifying specific icons on the screenshot. I believe that Leadtools has some nice libraries but they are expensive. I also don't need all of the scanning/TWAIN support as my images will already be in raster format. Any help/pointer...
5
1987
by: klall | last post by:
Hello. I need to extract date information from a memo field entered in the following way: 01/01/2005 - 31/12/2005 01/01/2004 - 31/12/2004 01/01/2003 - 31/12/2003 01/01/1996 - 31/12/1996. The number of entries varies. I would welcome advice on a more elegant way of extracting all the date information (first date, second date, third date, etc and appending to another table, say tblDates) rather than the crude way I have used left
1
1218
by: TWX | last post by:
Hi there. I need to create a PHP programme that will return a person's birthday when his class and index number is keyed. I have the neccesary information but I only know how to create the frame of the programme, stuck at the part of extracting the birthday with the collected information that the user has chosen from the options. Can someone please give me a clue on how to do this, that is, to extract the wanted person's birthday (when his class...
6
4458
by: Werner | last post by:
Hi, I try to read (and extract) some "self extracting" zipefiles on a Windows system. The standard module zipefile seems not to be able to handle this. False Is there a wrapper or has some one experience with other libaries to
0
9705
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, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9576
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,...
1
10310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
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
9138
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 project—planning, coding, testing, and deployment—without 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
6847
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
5515
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
4291
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.