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_conten ts($url);
$done=explode(" @",$lines);
for($i=0;$i<cou nt($done)+1;$i+ +)
{
$j=$i+1;
$a=strrpos($don e[$i],":");
$b=strrpos($don e[$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)."@".su bstr($back,0,st rpos($back,chr( 34)))."<br>";
}else{
echo "Line $i
".substr($front ,strrpos($front ,":")+1)."@".su bstr($back,0,st rpos($back,"<") )."<br>";
}
}else{
if($c<$d){
echo "Line $i
".substr($front ,strrpos($front ,">")+1)."@".su bstr($back,0,st rpos($back,chr( 34)))."<br>";
}else{
echo "Line $i
".substr($front ,strrpos($front ,">")+1)."@".su bstr($back,0,st rpos($back,"<") )."<br>";
}
}
}
?>
*************** *************
I am looking at www.bihstudenti.com/kontakt.php content..
Please help, do any one have a clue what is wrong..
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_conten ts($url);
$done=explode(" @",$lines);
for($i=0;$i<cou nt($done)+1;$i+ +)
{
$j=$i+1;
$a=strrpos($don e[$i],":");
$b=strrpos($don e[$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)."@".su bstr($back,0,st rpos($back,chr( 34)))."<br>";
}else{
echo "Line $i
".substr($front ,strrpos($front ,":")+1)."@".su bstr($back,0,st rpos($back,"<") )."<br>";
}
}else{
if($c<$d){
echo "Line $i
".substr($front ,strrpos($front ,">")+1)."@".su bstr($back,0,st rpos($back,chr( 34)))."<br>";
}else{
echo "Line $i
".substr($front ,strrpos($front ,">")+1)."@".su bstr($back,0,st rpos($back,"<") )."<br>";
}
}
}
?>
*************** *************
I am looking at www.bihstudenti.com/kontakt.php content..
Please help, do any one have a clue what is wrong..
Comment