R. Joseph Newton wrote: > Bob Showalter wrote: > > > [EMAIL PROTECTED] wrote: > > > I have a PHP vs. Perl question for a hobby project of mine. Which > > > would be the better language to use if I wanted to go out to a > > > particular web page and parse the table that's there? How about if > > > each row in the HTML table contains a link to another Web page > > > which has information I want to grab? (BTW, the page I'm thinking > > > of is the Catalog of Extrasolar Planets by Jean Schneider, at > > > http://www.obspm.fr/encycl/catalog.html.) > > > > > > FYI, I've never done any Web programming. > > > > AFAIK, PHP is a server-side language. What you're describing is a > > client application. I don't think you can write general-purpose > > client applications using PHP (PHP guys correct me if I'm wrong!). > > I'm sure PHP can do HTTP client stuff, but I think you still need > > to be operating in the server environment. > > > > Perl has the LWP family of modules for doing HTTP client > > applications, as well as various HTML and XML parsing modules that > > can be used for what you're describing. > > PHP does describe itself as a genral-purpose language. We > know, though, that Perl has LWP::UserAgent, which sound > pretty well-suited for scott's task. He would probably have > to ask on a PHP list to really get a wide range of eedback on > client modules available for PHP > > My guess is that there is sometime similar, and the decision > would come down to a matter of taste.
But can you write a "stand-alone" script using PHP and run it from a shell prompt, for example? Or can it only run in the context of a web server servicing an HTTP request? I'm asking out of ignorance. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]