using php for text manipulation

Discussion in 'OT Technology' started by Tk, Jul 8, 2003.

  1. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    possible? :dunno:

    heres what i want to do...

    currently i use moveabletype for my blog system. i want to have my blog on a static page around an iframe that has the blog entries in it. i made a second index template so that i could just pull the entries right from there. anyhow what im wondering is when i pull the code out of there, will it be the moveabletype template code, or html code?
     
  2. Rob

    Rob OT Supporter

    Joined:
    Jul 6, 2002
    Messages:
    88,626
    Likes Received:
    41
    Location:
    Atlanta, GA
    PHP is pretty close to C++ no? If so it should be easy.
     
  3. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    yeah i was reading through my php book and found this:

    PHP:
    <?php
    $filename 
    "blog.html";
    $fd fopen($filename"r");
    $filestring fread($fdfilesize($filename));
    fclose($fd);
    ?>
    and

    PHP:
    <?php
    $filename 
    "blog.html";
    $fd fopen($filename"r");
    $filestring fread($fdfilesize($filename));
    fclose ($fd);
     
    //do manipulation to $filestring
     
    $fd fopen($filename"w");
    fwrite($fd$whole);
    fclose ($fd);
    ?>
    that = a good start :o
     
  4. Rob

    Rob OT Supporter

    Joined:
    Jul 6, 2002
    Messages:
    88,626
    Likes Received:
    41
    Location:
    Atlanta, GA
    Whoaa! Nice color coding.
     
  5. Tk

    Tk Well-Known Member

    Joined:
    Dec 23, 2001
    Messages:
    23,086
    Likes Received:
    285
    Location:
    nw iowa
    never mind about the whole thread, i figured out a different way to do it without having to do any text manipulation :)

    and code coloring was done by the [.php][./php] tags ;)
     

Share This Page