|
123456789101112131415161718192021222324 |
- <?php
-
- if($_GET){
- $url = $_GET['url'];
- $name = basename($url);
- list($txt, $ext) = explode(".", $name);
- $name = "map.jpg";
-
- if($ext == "jpg" or $ext == "png"){
- $upload = file_put_contents("uploads/$name",file_get_contents($url));
-
- if($upload)
- echo "Success: <a href='uploads/".$name."' target='_blank'>Check Uploaded</a>"; else "Erreur !";
- }
- else{
- echo "Erreur !";
- }
- }
- ?>
-
- <!-- <h3>Paste the url and hit enter!</h3>
- <form action="" method="post">
- Your URL: <input type="text" name="url" />
- </form> -->
|