Jump to content

playwright

Members
  • Posts

    31
  • Joined

  • Last visited

    Never

Everything posted by playwright

  1. I want to remove a div tag with all its content..so far i' m able to remove tags that don't contain any other tags inside..e.g <b>bla bla bla </b>..However the div tag i want to remove is like <div class="" style=""><tag>bla bla...<other tag/>....</tag></div>..any ideas??
  2. any idea about how i can parse multiple pages????
  3. unfortunately it gives me an error: Parse error: syntax error, unexpected T_STRING are you sure i can leave whitespace between div and class??
  4. do you know which regex may fit for <div class="quotationHeaderText">bla bla bla </div>??
  5. I also want to ask how i can delete the content that exists between two tags and exists in the content that i have grabbed with the above code?? more specific the tag is <div class="........">bla bla</div>
  6. Hello..i'm new to php so i need some real help in here... I trying to create a web scraper that grabs a forum's content and shows only the posts. . The source code is here: <html> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <?php $html = file_get_contents ('http://www.......'); $dom = new DomDocument(); @$dom->loadHTML ($html); $xpath = new DOMXPath ($dom); $key = $xpath->query ('//*[@class=postTextContainer]'); foreach($key as $keys){ echo $keys->nodeValue ,"<br/> \n"; } ?> </html> can anyone tell me how i could grab all the posts that are in the same thread??now i can only grab the posts that are in the above url..i think it's called multiple page scraping??
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.