- $rep1="Что менять в Iframeах";
- $rep2="На что заменять в Iframeах";
- @i_links=();
- open(FL,"<index1.php");
- while(<FL>) {$file.=$_;}
- close(FL);
- while ($file=~m/ \<iframe(.*?)src=\"(.*?)\"(.*?)\>/gs)
- {$i_links[@i_links]=$2;}
- for($itr=0;$itr<@i_links;$itr++)
- {$fname=$i_links[$itr];
- $file="";
- open(FL,"<$fname");
- while(<FL>) {$file.=$_;}
- close(FL);
- $file=~g/$rep1/$rep2/gs;
- open(FL,">$fname");
- print FL $file;
- close(FL);}