help on code php
Posted: Fri Aug 31, 2007 3:55 am
I need help on the code,I have seen the code,but I do not succeed to make to work it.
it comes recalled through a form that it has this code:
thanks.
aspect answers
it comes recalled through a form that it has this code:
Code: Select all
<html>
<head>
<meta http-equiv="Content-Language" content="it">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>tesi/trovalink.php</title>
</head>
<body>
<?php
//apertura file
$filename =$_POST ["indirizzo"];
$file=fopen ("$filename","r");
//controllo se il file esiste o viene aperto correttamente
if (!$file){
echo "impossibile aprire il file remoto.";
//exit;
}
else {
echo "operazione riuscita";}
//scorro il file alla ricerca dei link
while (!feof ($file)) {
$linea=fgets ($file,1024);
//controllo per ogni linea se viene trovata l'espressione regolare
if (eregi ('href="([^"+)"[^>]*>([^<]+)',$line,$parts));{
$link[ ]=$parts;
}
}
fclose($file);
echo"$link[ ]";
?>
</body>
</html>aspect answers
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.