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?
|