Re: making system calls from a php extension

From: Date: Wed, 11 May 2011 04:01:17 +0000
Subject: Re: making system calls from a php extension
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-52267@lists.php.net to get a copy of this message
I'm basically using lynx to convert some html into plain text basically replicating the following command: *lynx -pseudo_inlines=off -hiddenlinks=merge -reload -cache=0 -notitle -force_html -dump -nocolor -stdin* I've been looking but I didn't find any other library capable to do the same with "almost" the same quality. Thanks On Wed, May 11, 2011 at 12:53 AM, Rasmus Lerdorf <rasmus@lerdorf.com> wrote: > On 05/10/2011 08:42 PM, Gabriel Sosa wrote: >> >> hello everyone! >> >> I'm trying to gain some speed by moving a function from PHP legacy >> code to C and making an extension. I'm trying to call *lynx* from the >> command line since their C api isn't something soo nice likely to use >> it as any other libXX > > If it were me I would take a step back and look at what lynx was actually > needed for and whether there are other libraries out there that can do > similar things. Like libcurl + the html parsing available in libxml2, for > example. I'm assuming you are calling lynx in order to use its html parser? > > Moving something from PHP to C for performance reasons, but leaving in the > call to an external program isn't going to buy you much, if anything, since > most of your time is spent forking and launching that external program on > each request. > > -Rasmus > -- Gabriel Sosa Si buscas resultados distintos, no hagas siempre lo mismo. - Einstein

« previous php.internals (#52267) next »