Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: How to identify a script as a browser?

From: carlos:lorenz:gma:il at: 12-Sep-2007 14:47

Anton, I thought it was something related to browser identification but you have showed me I was wrong in fact. In fact the next page produced by the javascript is what I need to read in order to measure my connection. thanks 2007/9/12, Anton Rolls <anton-wilddsl.net.au>:
> > Hi Carlos, > > I don't think this problem has anything to > do with browser identification. > > From my proxy log: > > Request: www.altanet.psi.br/velocidade/initialmeter.php > Request: www.altanet.psi.br/velocidade/style.css > Request: www.altanet.psi.br/favicon.ico > Request: www.altanet.psi.br/velocidade/meter.php?kbps=104857.6 > Request: > > www.altanet.psi.br/velocidade/results.php?kbps=11686.2&downloadtime=2.103&KB > =3000&recorded=1 > Request: www.altanet.psi.br/velocidade/images/1.gif > Request: www.altanet.psi.br/velocidade/images/2.gif > Request: www.altanet.psi.br/velocidade/images/3.gif > Request: www.altanet.psi.br/velocidade/images/4.gif > Request: www.altanet.psi.br/velocidade/images/5.gif > Request: www.altanet.psi.br/velocidade/images/you.gif > > The first page contains javascript which constructs > a url algorithmically and loads the next page from it. > > Extra confusion is probably caused by the fact > that the initial page contains a lot of binary > (~130kb) in the middle, sandwiched between valid-looking > html. > > This binary appears to be simply to make the page > load more slowly so that the speed can be measured. > But the binary part of the page contains some characters > which can't be printed in the Rebol console. > Those characters prevent the entire page being printed, > soon after the binary begins. > > You can read the whole page by doing this: > > url: http://www.altanet.psi.br/velocidade/initialmeter.php > bin: read/binary url > write/binary %page.html bin > > Then open page.html in your favourite editor. > > You could time the page download and use rebol to construct > the url in a similar way as the javascript does. > > Regards, > > Anton. > > > Alessandro, > > > > On this page > > http://www.altanet.psi.br/velocidade/initialmeter.php there is > > a speed meter that I want to monitor using a simple "read" within a > REBOL > > script. This page is generated by a PHP script that somehow knows > > that I am > > not using a web browser to navigate it and hides some information on the > > page from me. > > > > So I thought if I could "identify" my REBOL script as a web bowser maybe > I > > could read all the info I need form that page > > > > > Carlos Lorenz > > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. >
-- Carlos Lorenz www.revistaeletronica.com.br Unidade Lorenz Ltda (11) 4034 1971