curl-users
Re: javascript
Date: Wed, 22 Mar 2006 07:24:46 -0600
What do you mean by "send javascript commands"??
I had some success back in 2002 using Mozilla's Spidermonkey
javascript engine to process a proxy autoconfig file to decide whether
to use a proxy or not. I used curl to grab the autoconfig file from
the server, tacked on a small block of required functions and pushed
it through js. The result was either "DIRECT" or the name of the
proxy to use.
If you're hoping to process a web page and "do the right thing" for
the javascript it contains, there's a *lot* more work involved. You'd
probably end up writing a large fraction of a web browser to be able
to handle all the javascript that could show up.
Ralph Mitchell
On 3/22/06, Richard <antonyjones101_at_yahoo.com> wrote:
> Hi Kjell,
>
> Thanks for the quick reply!
>
> That's a bit of a shame as being able to send
> javascript commands would simplify my life immensely!
>
> Is there nothing out there at all that could be used
> alongside libcurl to send javascript commands?
>
>
> --- Kjell Ericson <Kjell.Ericson_at_haxx.se> wrote:
>
> > On Wed, 22 Mar 2006, Richard wrote:
> >
> > > I know that the faq of libcurl says that
> > javascript isn't possible with
> > > libcurl but was wondering if there had been any
> > sort of add ons written
> > > since that was published to allow javascript
> > commands to be used with
> > > libcurl?
> >
> > No.
> >
> > That is quite extensive work and I don't think
> > anyone will do it within many
> > years. I missed it sometimes myself, but when
> > getting down to ground I don't
> > really know what curl should do with the
> > javascripts.
> > It would be better to have a separate library
> > handling javascripts and with a
> > callback requests new web data.
> >
> > That new library could ofcourse use libcurl, but
> > libcurl will probably never
> > handle javascript itself.
> >
> > // Kjell
> >
>
>
>
>
> ___________________________________________________________
> Win a BlackBerry device from O2 with Yahoo!. Enter now. http://www.yahoo.co.uk/blackberry
>
Received on 2006-03-22