|
|
|
||||
|
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. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
RIP Dodger. BEST.CAT.EVER
Industry Role:
Join Date: Dec 2002
Location: NYC Area
Posts: 18,450
|
Program to create files based on a text list?
Does anyone know of a program to create files based on a text list?
For ex. my text list would look like: 1 2 3 4 5 I'd want to create: 1.txt 2.txt 3.txt 4.txt 5.txt etc...
__________________
-uno icq: 111-914 CrazyBabe.com - porn art MojoHost - For all your hosting needs, present and future. Tell them I sent ya! |
|
|
|
|
|
#2 |
|
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
would be simple to do in php
what would you like the file to contain.?
__________________
hatisblack at yahoo.com |
|
|
|
|
|
#3 |
|
RIP Dodger. BEST.CAT.EVER
Industry Role:
Join Date: Dec 2002
Location: NYC Area
Posts: 18,450
|
some code that would also contain the name of the file-ext. in the file.
__________________
-uno icq: 111-914 CrazyBabe.com - porn art MojoHost - For all your hosting needs, present and future. Tell them I sent ya! |
|
|
|
|
|
#4 | |
|
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
Quote:
make a folder somewhere put the code below in a file called index.php make a folder called results. this is where the created files willl be saved ( chmod the folder to be writeable ) save the list in a file called file.txt ( in the same folder as index.php ) Code:
<?php
$fil = "file.txt";
$sc = file_get_contents($fil);
$emt = explode("\n",$sc);
foreach( $emt as $pn => $mub){
$dub = str_replace(" ","-",$mub);
$wrt = "STUFF INSIDE FILE $dub.txt";
$fol = "results/$dub.txt";
echo "Saved $dub.txt \n<br>";
$hn = fopen($fol, 'w+');
fwrite($hn, $wrt);
fclose($hn);
}
?>
__________________
hatisblack at yahoo.com |
|
|
|
|
|
|
#5 |
|
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
if you have troubles let me know
__________________
hatisblack at yahoo.com |
|
|
|
|
|
#6 |
|
RIP Dodger. BEST.CAT.EVER
Industry Role:
Join Date: Dec 2002
Location: NYC Area
Posts: 18,450
|
Wow, thanks man!
__________________
-uno icq: 111-914 CrazyBabe.com - porn art MojoHost - For all your hosting needs, present and future. Tell them I sent ya! |
|
|
|
|
|
#7 |
|
RIP Dodger. BEST.CAT.EVER
Industry Role:
Join Date: Dec 2002
Location: NYC Area
Posts: 18,450
|
I'm really going to need to learn php one of these days.
__________________
-uno icq: 111-914 CrazyBabe.com - porn art MojoHost - For all your hosting needs, present and future. Tell them I sent ya! |
|
|
|