Jump to content
php.lv forumi

Vajag tikai dažas rindiņas!


peeda

Recommended Posts

Uzrakstīju kodu:

<?php $user=$_GET["user"];
$pass=$_GET["pass"];
$mbox = imap_open("{127.0.0.1:143}", "$user", "$pass");
$sort=imap_sort($mbox, SORTDATE, 1);
$headers = imap_headers($mbox);
  while (list($key, $val) = each ($headers)) {
      echo "<a href=\"zina.php?user=$user&pass=$pass&msg=$key\">" . $val . "<br/>";
  }
?>

Tikai nemāku uztaisīt lai sistēma nevis parāda uzreiz visus meilus, bet gan, piemēram, pirmos desmit.

Link to comment
Share on other sites

Kaut kas līdzīgs:

<?php $user=$_GET["user"];
$pass=$_GET["pass"];
$mbox = imap_open("{127.0.0.1:143}", "$user", "$pass");
$sort=imap_sort($mbox, SORTDATE, 1);
$headers = imap_headers($mbox);
$skaits = 0;
 while ((list($key, $val) = each ($headers)) && $skaits < 10) {
     echo "<a href=\"zina.php?user=$user&pass=$pass&msg=$key\">" . $val . "<br/>";
     $skaits++;
 }
?>

Link to comment
Share on other sites

×
×
  • Create New...