473,320 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

browscap.ini as an Array?

If you take a look at this page:

http://www.abiglime.com/webmaster/ar...asp/121798.htm

there is "[A]n example of using this component...below"

Here he sets the ServerObject but lists each component of the object as if he knows what they are. Granted I could always go to browsecap.ini and find these for my version of the browser. But that's not good. What I'd like is something such as this:

<%
For Each v in browserdetect
'
Next
%>

But I get this is not supported. How can I access the components of the browscap.dll in this way? Thanks.

--
George Hester
__________________________________
Jul 19 '05 #1
2 1838
If you look closely at browscap.ini, it can't be used in the way you
suggest. It uses wildcard pattern matching, so what do you expect to put in
your array? And what can you do with it that browscap doesn't already do?

The major browser shifts are relatively trivial to differentiate with simple
string parsing. There is no need for all this added complexity, IMHO...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"George Hester" <he********@hotmail.com> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
If you take a look at this page:

http://www.abiglime.com/webmaster/ar...asp/121798.htm

there is "[A]n example of using this component...below"

Here he sets the ServerObject but lists each component of the object as if
he knows what they are. Granted I could always go to browsecap.ini and find
these for my version of the browser. But that's not good. What I'd like is
something such as this:

<%
For Each v in browserdetect
'
Next
%>

But I get this is not supported. How can I access the components of the
browscap.dll in this way? Thanks.

--
George Hester
__________________________________
Jul 19 '05 #2
The dll tries to match the useragent in the headers to find its location in the ini file. Once that is done the entries under that section should not have to be obtained by knowing what they are. That makes the use of the component a bummer. Once the dll finds the section in the ini that most approximates the useragent in the headers then we should be able to send what is there to an array. I believe the issue here is getting the data out of a ini file. An ODBC connection may be necessary with a schema.ini where we could then just get a record and list the fields. For that is really what I am looking for; the fields and the data. Just a thought.

--
George Hester
__________________________________
"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message news:uW*************@tk2msftngp13.phx.gbl...
If you look closely at browscap.ini, it can't be used in the way you
suggest. It uses wildcard pattern matching, so what do you expect to put in
your array? And what can you do with it that browscap doesn't already do?

The major browser shifts are relatively trivial to differentiate with simple
string parsing. There is no need for all this added complexity, IMHO...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/




"George Hester" <he********@hotmail.com> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
If you take a look at this page:

http://www.abiglime.com/webmaster/ar...asp/121798.htm

there is "[A]n example of using this component...below"

Here he sets the ServerObject but lists each component of the object as if
he knows what they are. Granted I could always go to browsecap.ini and find
these for my version of the browser. But that's not good. What I'd like is
something such as this:

<%
For Each v in browserdetect
'
Next
%>

But I get this is not supported. How can I access the components of the
browscap.dll in this way? Thanks.

--
George Hester
__________________________________

Jul 19 '05 #3

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

Similar topics

2
by: Brian | last post by:
I'm diddlying with a script, and found some behavior I don't understand. Take this snippet: for ($i = 0; $i <= count($m); $i++) { array_shift($m); reset($m); }
2
by: Stormkid | last post by:
Hi Group I'm trying to figure out a way that I can take two (two dimensional) arrays and avShed and shed, and subtract the matching elements in shed from avShed I've pasted the arrays blow from a...
6
by: Mattias Campe | last post by:
Hello, today I stumbled across the function get_browser (http://be2.php.net/manual/en/function.get-browser.php). Totally excited, I tried it out. Hmm, didn't seem to work :-s. So I read the...
15
by: lawrence | last post by:
I wanted to test xml_parse_into_struct() so I took the example off of www.php.net and put this code up on a site: <?php $simple = <<<END <item>
8
by: vcardillo | last post by:
Hello all, Okay, I am having some troubles. What I am doing here is dealing with an employee hierarchy that is stored in an array. It looks like this: $employees = array( "user_id" => array(...
12
by: Sam Collett | last post by:
How do I remove an item with a specified value from an array? i.e. array values 1,2,2,5,7,12,15,21 remove 2 from array would return 1,5,7,12,15,21 (12 and 21 are NOT removed, duplicates are...
8
by: Mike S. Nowostawsky | last post by:
I tried using the "toUpperCase()" property to change the value of an array entity to uppercase BUT it tells me that the property is invalid. It seems that an array is not considered an object when...
58
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of...
2
by: Eduardo | last post by:
Hi people, I need some help. A important proccess in my application need to know if the browser avail javascript, using server-side code, but the server have not browscap.ini. Somebody may help...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.