To isolate the Body Code Block of a site

Discussion in 'HTML & Website Design' started by Yfcadmin, May 8, 2007.

  1. #1
    Hi,
    Is there are a way to extract body block of bigblueball .com . I mean the body Block under header after the line:

    IM Centers: AIM MSN Yahoo! ICQ Google Talk Trillian Other IM

    Can anyone help me. I tried it. But the table symmetry and blue color of the left and right block dont show up. Also the lines drawing the tables dont show up. can anyone help me.

    I'll add green to each one who replies and helps me out :D
     
    Yfcadmin, May 8, 2007 IP
  2. Louis11

    Louis11 Active Member

    Messages:
    783
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    70
    #2
    If you want just the body code use PHP and parse it out.

    
    <?
     $page = "http://www.bigblueball.com";
    
     // some CURL method would work best here
     // but for simplicities sake i'm just going to use
     // file_get_contents() — Reads entire file into a string
    
     $page = file_get_contents($page);
     $search = ''; // need to define your search regular expression
                   // off the top of my head, /<body>.*<\/body>/ 
    			   // *might* work. If not just develop a better
    			   // regex and you're set
     preg_match_all($search, $page, $result);
     var_dump($result);
    
    ?>
    
    PHP:
     
    Louis11, May 8, 2007 IP
    Yfcadmin likes this.
  3. Yfcadmin

    Yfcadmin Notable Member

    Messages:
    2,616
    Likes Received:
    331
    Best Answers:
    0
    Trophy Points:
    230
    #3
    Well I want to use a body layout as them in an HTML format. I simply want to remove their header and footer. :) adding rp to you ... but please reply me again.
     
    Yfcadmin, May 8, 2007 IP