Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- set_time_limit(1);
- $find=array('cipa','chuj','kurwa');
- $replace=array('wagina','penis','prostytutka');
- if(isset($_POST['plik'])&&!empty($_POST['plik'])){
- $x=$_POST['plik'];
- $text= file_get_contents($x);
- $text_new= str_ireplace($find, $replace, $text);
- $y=1;
- while(file_exists("uploads/plik".$y.".txt")){
- $y++;
- }
- $name="plik".$y.".txt";
- $myfile = fopen("uploads/$name", "w");
- $file=fwrite($myfile,$text_new);
- if($file){
- echo "file loaded succesfully";
- }
- else{
- echo "error loading the file";
- }
- }
- ?>
- <form action="file.php" method="post">
- <input type="file" name="plik">
- <input type="submit">
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement