browscap.ini as an Array?

G

George Hester

If you take a look at this page:

http://www.abiglime.com/webmaster/articles/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.
 
A

Aaron Bertrand - MVP

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/




If you take a look at this page:

http://www.abiglime.com/webmaster/articles/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.
 
G

George Hester

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top