I want to parse a php page, is there anything to do that?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I want to parse a php page, is there anything to do that?
First, I need to login in php page, then I'm redirected to a necessary php page which contains some text I want to parse. Is there any tool to do that?
Thanks.
Well, when you enter into any sort of HTTP exchange, you really don't know and you really don't care whether the information you're seeing is being generated by a PHP program or not. You see only the HTTP data-stream that the PHP program produced.
Yes, in a variety of languages such as Java, Perl, Python, and I believe PHP, there are classes and objects which know how to carry out an HTTP exchange with a client.
These languages also have a variety of general-purpose parsing and text-grabbing facilities, which are often described under the somewhat peculiar term "regular expressions," sometimes abbreviated "regex." This is a dollar-and-twenty-nine-cent word for "text pattern matching." It's something the Unix environments are quite famous for.
Your programming will be made considerably easier if the PHP program in question can generate an XML-formatted output.
Last edited by sundialsvcs; 09-18-2006 at 03:09 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.