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 02-24-2009, 08:21 PM   #1
Sexxxy Sites
Confirmed User
 
Join Date: Oct 2005
Posts: 851
I need a software that will turn a text list of urls

into an indvidual html page for each url in the list. Does such an animal exist. I have google searched but have not as of yet found anything that will accomplish this.
Sexxxy Sites is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2009, 08:24 PM   #2
Steve Awesome
Confirmed User
 
Steve Awesome's Avatar
 
Industry Role:
Join Date: Jan 2007
Location: Mid-West!
Posts: 1,575
Can you show what a few of the URLS in your "text list" look like?

What do you want on each page? The same thing? Or do you just want a directory structure created?
Steve Awesome is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2009, 08:24 PM   #3
drocd
Confirmed User
 
Join Date: Aug 2007
Posts: 128
Hit me up and we can build a custom solution for you.
__________________
230-699
drocd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2009, 08:30 PM   #4
Sexxxy Sites
Confirmed User
 
Join Date: Oct 2005
Posts: 851
Quote:
Originally Posted by Steve Awesome View Post
Can you show what a few of the URLS in your "text list" look like?

What do you want on each page? The same thing? Or do you just want a directory structure created?
Each line of the text list has a url and I want each url converted to an individual html page containing each single url. In other words if the text list has 300 urls I want the result to be 300 html pages.
Sexxxy Sites is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2009, 08:47 PM   #5
fallenmuffin
Confirmed User
 
fallenmuffin's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 8,170
Enjoy.

Code:
<?php

/* *************************
 * Fallen Muffin Media
 * http://www.fallenmuffin.com/
 ************************* */

$database = '/path/to/textfile.txt';
$path = '/path/to/html/files'; // no ending slash, make sure dir is chmod 777

/* ***************************
 * No modifications below this line
 *************************** */
$pieces = @file($database);
foreach ($pieces as $piece) {
	// get domain from url
	preg_match('@^(?:http://)?([^/]+)@i', $piece, $matches);
	$host = $matches[1];
	preg_match('/[^.]+\.[^.]+$/', $host, $matches);
	$domain = $matches[0];
	// data to write to html file
	$data = "<html><head><title>$domain</title></head><body><a href=\"$piece\">$domain</a></body></html>";
	// generate html file
	$fp = fopen($path.'/'.$domain.'.html', 'w');
	fwrite($fp, $data);
	fclose($fp);
}

?>
fallenmuffin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-24-2009, 11:17 PM   #6
ExLust
Confirmed User
 
ExLust's Avatar
 
Join Date: Aug 2008
Posts: 3,223
fallenmuffin had it for you.
__________________

BE A PARTNER
ExLust is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 02-25-2009, 12:48 PM   #7
fallenmuffin
Confirmed User
 
fallenmuffin's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 8,170
You're welcome...
fallenmuffin 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.