Zend - The PHP Company




HTTP

Add Code


Another version of latest mailing list archive  

Type: code fragment
Added by: idban
Entered: 29/07/2000
Last modified: 08/12/1999
Rating: **** (6 votes)
Views: 7877
another version of php-general archive grabber
( this one use marc.theaimsgroup.com )


<?  
// dedicate to my wife (  desy  ) who infected with
// Hepatitis B virus, throw 'em away honey!, you can doit!! 
// distribute as GPL! 
?> 
<table border="0" width="80%" bgcolor="#000000" cellspacing="0"> 
<tr> 
<td width="100%"><small><font face="Verdana" color="#FFFFFF"><strong>10 latest mail from php3 mailing  list on php3-general</strong></font></small>
<table border=0 width="100%">
<?   
$mytime
time(); 
$mounthstr=date("m",$mytime+(0*3600));
$yearstr=date("Y",$mytime+(0*3600));
$fp fsockopen("marc.theaimsgroup.com"80, &$errno, &$errstr30);
 if(!
$fp) {  
   echo 
"source down!! :( <br>n";  
   exit; }  
 else {  
$file=fopen("http://marc.theaimsgroup.com/?l=php-general&r=1&w=2&b=$yearstr$mounthstr","r");
 if (!
$file) {  
  echo 
"error when connectn";  
  exit;  }  

 while (!
feof($file)) {  
 
$line fgets($file,1024);  
 if (
eregi(". $yearstr-$mounthstr-$daystr(.*)"$line$got_it)){  
 
$got++;  
 if (
$got 10) { break; }  
$addlink=str_replace("href="","href="http://marc.theaimsgroup.com/",$got_it[1]); 
 if (
$got ) { $bgc="#C0C0C0"; } else { $bgc="#8080C0"; } 

echo
"<tr valign=top><td align=right bgcolor="$bgc"><small>$got.</td><td bgcolor="$bgc"><pre>$yearstr-$mounthstr-$addlink</td></tr>"
            }
     }  
  }  
fclose($file);  
?>  
<tr> 
<td width="100%" bgcolor="#8080C0" valign="top" colspan="2"><font face="Arial" color="#000000"><small><p align="right">source <a href="http://marc.theaimsgroup.com">marc.theaimsgroup.com</a> 
                    mailing list archive! copyright � <a href="http://marc.theaimsgroup.com">marc.theaimsgroup.com</a> 2000</small><br> 
                    <small>script done by<a 
                    href="http://php.klik.or.id"> 
                    idban secandri</a> take alook <a href="http://www.zend.com/codex.php?id=225&single=1">zend version</a>&nbsp;</small></font></td> 
</tr>
</table>
</td> 
</tr> 
</table>


Usage Example


See the example


Rate This Script





Search



This Category All Categories