View Full Version : specifics ref. converting from perl to php
shadkeene
04-17-2008, 08:27 PM
My company has unfortunately outlawed Perl from being used on its server. Considering its a scientific company, I think that its pretty stupid. Anyway, I have some scripts that aren't very useful unless they're on the server. Most of them are extracting text data from webpages and manipulating it. I'm specifically using html::tokeparser::simple for a lot of the parsing. Does anyone here have a useful counterpart in php that can do the trick? And if so, do you know if its standard in php or is an extension that I need to configure. Thanks!
Shad
KevinADC
04-17-2008, 11:01 PM
Ask on a php forum how to parse html documents with php.
oesxyl
04-17-2008, 11:13 PM
Ask on a php forum how to parse html documents with php.
as far as I know there is no such a extension, only local improvisation using regex, :)
regards
scrupul0us
05-07-2008, 01:14 AM
well you can use the DOM extensions to traverse websites for extraction:
http://www.php.net/manual/en/book.dom.php
http://www.php.net/manual/en/domdocument.loadhtml.php
http://www.php.net/manual/en/domdocument.loadhtmlfile.php
Thank should get you going in the right direction
... as for regexes ... it can be done, but learn the right way first and you'll be glad
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.