![]()  | 
	
		
 PHP help needed, lots of pages need same type of change.. 
		
		
		I've got about 90 freesites consisting of the following files: logo.html (logo on top and some text below), 
	style.css - page, font, link properties and a few generic pages which are the same in all sites (preview.html with a thumb layout, gallery1 and gallery2 with linking info and a few ad.html pages) All these files are connected together with php include(pagename.html) functions, meaning that you access index.php, it pulls warning.html first inside, then pages such as preview and sponsor ad pages get pulled as user gets deeped inside. I want to convert all those simple php sites into plain html sites. is there a program or some way (except manual one by one) to batch process all php pages and save them with a .html extension and all contents viewable by surfer? meaning that, instead of index.php with php include COMMAND for warning.html, I get an index.html with saved warning.html CONTENTS? I am probably asking too much, but still - I'm a newbie in php and don't know much about other more powerful commands and tools.  | 
		
 You could deffinately throw something together in perl quickly if all the pages were the same linking... 
	 | 
		
 why not make a custom PHP script to take care of the whole process ? 
	 | 
		
 php pages are absolutely the same in all 90 site folders, logo.html (which pulls logo.gif or .jpg, and provides page title info) and style.css are the only files different from site to site. 
	 | 
		
 Your reason for switching from PHP to HTML boggles my mind - but it's very possible with a simple perl script. 
	 | 
		
 Quote: 
	
 - I'm not even half way thru this book, custom php script for this task is a bit too complex for me at this point :) egonetworks - I have to do it because all sites are hosted on an AVS freehost, and they turned php off for security reasons.  | 
		
 Quote: 
	
  | 
		
  | 
		
 Depending on how its laid out, you could just use something like lynx and dump the source out.  
	lynx -source http://www.blah.com/index.php > warning.html Not sure if index.php has parameters that are passed or anything but dumping the source should make everything work as lynx is just a text browser and therefore would parse the page then spit out the html. Not sure if this is what you are looking for but you could easily whip up a script to do that in php and output the results. You could use PHP's fsockopen functions to do the same thing if you really wanted to have fun :) Andy  | 
| All times are GMT -7. The time now is 06:35 AM. | 
	Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
	
	©2000-, AI Media Network Inc123