loop through php page with different GET and save

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • beary
    New Member
    • Nov 2006
    • 170

    loop through php page with different GET and save

    Hello.

    I have a site running php pages looking like this: mypage.php?firs tname=bob&lastn ame=hoskins

    There are multiple different combinations of names

    eg. mypage.php?firs tname=bob&lastn ame=hoskins
    mypage.php?firs tname=jane&last name=elliot
    etc

    Is there a way I can make a script to automatically "go to" each of these pages in turn and then save each one as a .html file in a folder on the server? Almost as if I was using a "download whole site" program to create all the pages in the folder. (But they would need to be static html pages.) I'm open to various ways if there is more than one way to do this.

    Thanks.
  • brettl
    New Member
    • Sep 2007
    • 41

    #2
    I think you could use the Smarty - Template Engine and loop through an array of variables to produce static html pages. Here is the link to get smarty and read up on the documentation.

    Smarty - Template Engine

    Hope this helps.

    Comment

    • beary
      New Member
      • Nov 2006
      • 170

      #3
      Originally posted by brettl
      I think you could use the Smarty - Template Engine and loop through an array of variables to produce static html pages. Here is the link to get smarty and read up on the documentation.

      Smarty - Template Engine

      Hope this helps.

      Hmmm. This looks like overkill for what I need. Is there no simple php function or code snippet that would work?

      Comment

      Working...