Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Searching HTML code with PHP

2:04 am on Jan 15, 2010 (gmt 0)

Junior Member

5+ Year Member

joined:Sept 6, 2008
posts: 50
votes: 0

I need to write a script that will look at the HTML code generated by another PHP script, search that code for a specified string (opening td tag with attributes), load the code between that string and another specified string (closing td tag) into a variable, then loop until it doesn't find anymore instances of the first specified string. Can someone please help me?
2:36 am on Jan 15, 2010 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member themadscientist is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 14, 2008
votes: 62

This thread might help:

PHP to parse HTML [webmasterworld.com]

I think it was one of the last couple posts with the best answer, using PHPs DOM method... I didn't look at the thread when finding the link, so I don't remember exactly which post it was, but if I remember correctly one of the last couple posts seemed to contain the best answer.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members