Autor Zpráva
Budry
Profil
Zdravím, mám tento script:

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> 

Zadej URL adresu (bez [url=Http://]Http://[/url]) :  <input type="text" name="adresa">
                                  <input type="submit" value="Zkontrolovat" name="OK"> 

</form> 

<?php 

if(isset($_POST["OK"])){

  $adresa = "Http://".$_POST["adresa"];
  
  $adresa = explode("\n", htmlspecialchars(file_get_contents($adresa)));
  
    for( $i = 0; $i <= count($adresa); $i++)
    
      {
        echo "<pre>".$adresa[$i]."</pre>";
      };
      
};

?>


Ale nejde to:

Warning: file_get_contents(): Unable to access Http://www.jobik.xf.cz in /3w/xf.cz/j/jobik/****/index.php on line 33

Warning: file_get_contents(Http://www.jobik.xf.cz): failed to open stream: No such file or directory in /3w/xf.cz/j/jobik/****/index.php on line 33

Vím že bych měl file_get_contents() nahradit jinou funkcí ale nevím jakou. Nemohl by mi někdo poradit?

Předem díky
Budry
Profil
Prostě potřebuji vytáhnout zdrojový kód z jedné stránky a potom ho vypsat
Nox
Profil
file get contents by to měla být, ale chybová hláška ti říká, že dáváš tí funkci špatnou adresu
Budry
Profil
Máš pravdu měl jsem velké H u http:// ale teď mi to zase nejde:

Warning: file_get_contents(): URL file-access is disabled in the server configuration in /3********************************* on line 33

Warning: file_get_contents(http://www.jobik.xf.cz): failed to open stream: no suitable wrapper could be found in /3********************************* on line 33
Budry
Profil
To je to o čem jsem mluvil nevím čím to file nahradit?
Mike8748
Profil
Budry
nic nenahrazuj

do .htaccess souboru pridej

php_flag allow_url_fopen on
Budry
Profil
OK díky to je ono

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0