cooldude832 Posted November 13, 2007 Share Posted November 13, 2007 any ideas? Quote Link to comment Share on other sites More sharing options...
AndyB Posted November 13, 2007 Share Posted November 13, 2007 explode() (with <body> as the delimiter) and take the second array element would be my approach. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 13, 2007 Author Share Posted November 13, 2007 i did this, but I want to get the trail of the body tag out of there also $data = explode("<body",$data); $data = explode("</body>",$data[1]); print_r($data[0]); Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 13, 2007 Author Share Posted November 13, 2007 what about a preg_split()? if i can just find hte match Quote Link to comment Share on other sites More sharing options...
AndyB Posted November 13, 2007 Share Posted November 13, 2007 I don't do regex, but I do know explode can do what you ask (well, explode twice can). $data = explode("<body>",$data); $data = explode("</body>",$data[1]); print_r($data[0]); Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 13, 2007 Author Share Posted November 13, 2007 that only works if the body is a pure body tag, I need a much more universal, also it fails to match <BODY> or <Body onload="dothis"> see what I mean, I think regex is the answer here Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.