Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-31-2003, 02:55 AM   #1
Ash@phpFX
Confirmed User
 
Join Date: Nov 2003
Posts: 4,292
PHP Question

does anyone know how to generate html pages from php.

I have a php script that displays my TGP galleries, as well as archives sections, but i want to output what the surfer would see to a html file.

any help is greatly appreciated.
Ash@phpFX is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2003, 05:30 AM   #2
Mishi
Confirmed User
 
Join Date: Feb 2002
Location: Scottsdale, AZ
Posts: 1,054
A little more specific please? Or ICQ 47966255, but I'm about to go to dreamland.
__________________
Looking for PHP/MySQL solutions? Check out Cyboriginal - custom scripts, installation services and more.
Mishi is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2003, 05:33 AM   #3
Nightwork
Registered User
 
Join Date: Oct 2003
Posts: 61
asher,

contact me on ICQ.

This shouldn't be that hard, will have u on the right track in 5 min.
__________________
God may have created the world in 6 days, but you can bet your ass that while he rested on the 7th, a programmer coded it all.<br>ICQ:48322442
Nightwork is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2003, 05:34 AM   #4
keyDet79
Confirmed User
 
Join Date: Feb 2003
Location: Netherlands
Posts: 1,109
I think you mean: copy("http://server.com/file1.php","file1.html")
__________________

Multihomed quality BW for less
ICQ 51034232 - MSN [email protected] - Email keydet(at)vibehosting.com
keyDet79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2003, 06:07 AM   #5
Hansm
Confirmed User
 
Join Date: Jun 2002
Posts: 871
a preview thumbnail or the output of the .html page?
Hansm is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2003, 06:50 AM   #6
pornanza
Confirmed User
 
Join Date: Jul 2003
Location: East Village
Posts: 238
$file = fopen('index.html', 'w');

fwrite($file, '&lt;html&gt;');

fwrite($file, 'lots of content here');

fwrite($file, '&lt;/html&gt;');

fclose($file);


instead of echoing the HTML to user, write the information to a file.

ryan
__________________
Eskimo Hoe
QuickWank
Pornanza!
pornanza is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2003, 06:57 AM   #7
Ash@phpFX
Confirmed User
 
Join Date: Nov 2003
Posts: 4,292
Nightwork, thats a lot, saved me a lot of potential heartache

Ash@phpFX is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-31-2003, 07:11 AM   #8
Nightwork
Registered User
 
Join Date: Oct 2003
Posts: 61
at your service, asher ;)

keydet, copy wouldn't do the trick, because it will copy the actual source of the .php file, not the parsed result.

pornanza, that's basically the idea, but the fwrite for the html tags would generate errorous html, because the parsed result already contains the tags.

PHP Code:
//open page
$fd=fopen("http://www.server.com/galleries.php","r");

//retrieve contents (eof won't work with remote filereading)
while ($line=fgets($fd,1000))
{
$alltext.=$line;
}
fclose ($fd);
//open local file (or create if doesn't excist, check for correct 
//permissions in dir, pointer set to begin of file
$out fopen("galleries.html""w");
//write retrieved content
fwrite($out$alltext);
fclose($out); 
^ the used code, enjoy
__________________
God may have created the world in 6 days, but you can bet your ass that while he rested on the 7th, a programmer coded it all.<br>ICQ:48322442
Nightwork is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.