Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Static sites w/ GS - speed & security. "GetSimpler"
#23
Carlos Wrote:
Code:
function verysimplestatic_writepage($slug) {
    global $SITEURL;
    
    $s=file_get_contents($SITEURL.'/index.php?id='.$slug);
    $filename=GSROOTPATH.VERYSIMPLESTATIC_RELPATH.$slug.'.'.VERYSIMPLESTATIC_EXT;
    $fich=fopen($filename,'w');
    if( fwrite($fich, $s) ) {
        echo 'File '.$filename.' created/updated.';
    } else {
        echo "ERROR writing static page! ($filename)<br>";
    }
    fclose($fich);
}

Hie hie,. now that I look at your code, I realize how much easier I could have done it, forgot you can use file_get_contents to pull the webpage if urll passhru is on.
tx.. will remember that in future Big Grin
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply


Messages In This Thread
Static sites w/ GS - speed & security. "GetSimpler" - by dominionit - 2011-07-20, 06:49:50



Users browsing this thread: 1 Guest(s)