View Single Post
Old 02-20-2014, 08:54 AM  
adultforum
SEO SPECIALIST
 
adultforum's Avatar
 
Industry Role:
Join Date: Nov 2010
Location: Europe
Posts: 2,438
Small PHP custom script

I have one file called list.txt with X names one on each line
john
max
mike
...

and a file called text.txt with a php text code inside.
<?
random codes
CUSTOMWORD
random codes
CUSTOMWORD
random codes
....

I need a php script which will do the following:
1-open list.txt, take the first name and create in the same folder a file called name.php
EX: john.php in first case
2-paste there the text from text.txt
3-search for CUSTOMWORD inside the text and replace it with name (in first case john)
result will be:
<?
random codes
john
random codes
john
random codes
....
4-close and save the file
5-do the same for all words listed in list.txt


Can anyone help me with the code?
__________________
ICQ#: 376883609 Skype: AdultSEO

[email protected]
SEO Specialists - will make it happen.

Awesome domains for sale - Reserve yours now.

It’s never too late to MAKE MONEY with BITCOIN. Use this link and receive a 10% fee discount for 6 months.
adultforum is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook