|
Posted by NurAzije on 10/22/05 12:29
I have written a code and can't figure what is wrong, the code will
read a content of a file and cut all the emails from it,then echo them,
but I have a problem with '"' charecter I think..
Take a look:
****************************
<?php
$url="http://www.bihstudenti.com/kontakt.php";
$lines = file_get_contents($url);
$done=explode("@",$lines);
for($i=0;$i<count($done)+1;$i++)
{
$j=$i+1;
$a=strrpos($done[$i],":");
$b=strrpos($done[$i],">");
$c=strpos($done[$j],chr(34));
$d=strpos($done[$j],"<");
$front=$done[$i];
$back=$done[$j];
if($a>$b){
if($c<$d){
echo "Line $i
".substr($front,strrpos($front,":")+1)."@".substr($back,0,strpos($back,chr(34)))."<br>";
}else{
echo "Line $i
".substr($front,strrpos($front,":")+1)."@".substr($back,0,strpos($back,"<"))."<br>";
}
}else{
if($c<$d){
echo "Line $i
".substr($front,strrpos($front,">")+1)."@".substr($back,0,strpos($back,chr(34)))."<br>";
}else{
echo "Line $i
".substr($front,strrpos($front,">")+1)."@".substr($back,0,strpos($back,"<"))."<br>";
}
}
}
?>
****************************
I am looking at www.bihstudenti.com/kontakt.php content..
Please help, do any one have a clue what is wrong..
[Back to original message]
|