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

How to identify a script as a browser?

 [1/8] from: carlos:lorenz::gmail at: 6-Sep-2007 10:28


Hi list, How can I identify my script as a web browser to a certain server at internet? TIA -- Carlos Lorenz www.revistaeletronica.com.br Unidade Lorenz Ltda (11) 4034 1971

 [2/8] from: ale870:g:mail at: 6-Sep-2007 15:43


Sorry, but your question is not clear for me. Can you better explain what you want to do? Thank you! :-) On 9/6/07, Carlos Lorenz <carlos.lorenz-gmail.com> wrote:
> Hi list, > How can I identify my script as a web browser to a certain server at
<<quoted lines omitted: 8>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- //Alessandro http://sguish.wordpress.com http://laccio.wordpress.com

 [3/8] from: carlos:lorenz:gma:il at: 6-Sep-2007 10:57


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 2007/9/6, Alessandro Manotti <ale870-gmail.com>:
> Sorry, but your question is not clear for me. > Can you better explain what you want to do?
<<quoted lines omitted: 27>>
> 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

 [4/8] from: hallvard:ystad:babelserver at: 6-Sep-2007 16:03


Dixit Carlos Lorenz (15.57 06.09.2007):
>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
If the page is checking the user-agent string, you could try system/schemes/http/user-agent: "whatever you'd like to identify yourself as" ...but I couldn't even load the page with Firefox... HY

 [5/8] from: carlos::lorenz::gmail::com at: 6-Sep-2007 11:12


Hallvard, Many thanks. IŽll try 2007/9/6, Hallvard Ystad <hallvard.ystad-babelserver.org>:
> Dixit Carlos Lorenz (15.57 06.09.2007): > >So I thought if I could "identify" my REBOL script as a web bowser maybe
<<quoted lines omitted: 64>>
> 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

 [6/8] from: anton:wilddsl:au at: 13-Sep-2007 0:18


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.

 [7/8] from: carlos:lorenz:gmai:l 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
<<quoted lines omitted: 52>>
> 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

 [8/8] from: anton:wilddsl:au at: 13-Sep-2007 12:20


Hi Carlos, You can do a better job than the javascript if you use DIFFERENCE to measure the elapsed download time. It looks like the javascript discards the date information (I could be wrong), so it would produce incorrect results around midnight. Let us know how it goes. Anton.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted