<?php
 
/*
 
 * Filename.....: ebay_topangebote.php
 
 * Aufgabe......: Zeige die Liste der von der eBay-Startseite aus erreichbaren
 
 *                Topangebote-Seite mit ebay_de
 
 *                Einige Auktionen machen Probleme und können (noch) nicht
 
 *                korrekt ausgewertet werden.
 
 * Parameter....: 
 
 * Erstellt am..: Dienstag, 29. Juli 2003, 18:00
 
 *       _  __      _ _
 
 *  ||| | |/ /     (_) |        Wirtschaftsinformatiker IHK
 
 * \. ./| ' / _ __  _| |_ ___   www.ingoknito.de
 
 * - ^ -|  < | '_ \| | __/ _ \  
 
 * / - \| . \| | | | | || (_) | Peter Klauer
 
 *  ||| |_|\_\_| |_|_|\__\___/  06131-651236
 
 * mailto.......: [email protected]
 
 *
 
 * Änderungen:
 
 * 2008-12-24: Neuer URL, header(utf-8), nur die letzten 5 Angebote.
 
 * 2003-11-29: $html-Link changed, & to & in Listing, strpos in Schleife
 
 *             weil Ergebnis in einer einzigen, langen Zeile vorliegt.
 
 */
 
  header('Content-Type: text/html; charset=utf-8');  
 
?>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
<html>
 
<head>
 
<title>Ebay-Topangebote</title>
 
<style type="text/css">
 
  <!--
 
 
  BODY {
 
      font-family : Arial, Helvetica, sans-serif;
 
  }
 
 
  A,A:FOCUS, A:LINK, A:VISITED {
 
      text-decoration:none;
 
      color : navy;
 
  }
 
 
  A:HOVER,  A:ACTIVE {
 
      text-decoration:underline;
 
      color : red;
 
  }
 
 
  /* Evil Netscape */
 
  td {
 
      font-family : Arial, Helvetica, sans-serif;
 
  }
 
 
  a.test:link,a.test:visited{
 
      background-color : Black;
 
      color : Yellow;
 
      font-size : xx-small;
 
      font-weight : 900;
 
      letter-spacing : 2px;
 
      font-family : serif;
 
      text-decoration : none;
 
  }
 
  a.test:hover, a.test:active{
 
      background-color : Yellow;
 
      color : Black;
 
      text-decoration : none;    
 
  }
 
  
 
  .smalltd{
 
    font-size: x-small;
 
    color : navy;
 
    background-color: #ffffe8;
 
  }
 
  
 
  .smallth{
 
    font-size: small;
 
    color : navy;
 
    background-color: #ffffe8;
 
    font-weight: bold;
 
  }
 
  
 
  -->
 
</style>
 
</head>
 
<body>
 
 
<?php
 
 
include 'inc_ebay_de.php';
 
 
$ebay = new ebay_de();
 
 
# $such = '?ViewItem&item=';
 
$such = 'dSI(';
 
$such = ';item=';
 
 
$suchlaenge = strlen( $such );
 
$artikelnrlaenge = 10;
 
 
$url = 'http://pulse.ebay.de/';
 
 
$html = file( $url );
 
$oldartikel = 'x';
 
 
echo "<a href='$url'>$url</a><br>";
 
 
$all = '';
 
 
while( list( $key, $line ) = each( $html ) )
 
{
 
  $all .= $line;
 
  #echo "\n<br>".htmlentities($line);  
 
}
 
 
preg_match_all('/eBayISAPI\\.dll\\?ViewItem&item=([0-9]*)\\"/sim', $all, $regs, PREG_PATTERN_ORDER);
 
$regs = $regs[1];
 
  
 
for( $i = 5; $i < 10; $i++)
 
{
 
  $item = $regs[$i];
 
  
 
  
 
  $ebay->artikelnr = $item;  
 
  $ebay->init();
 
  $ebay->getdata(0);
 
  echo '<img src="'.$ebay->image.'" alt="" style="width:200px;float:left;margin:0 1em 1em 0">';
 
  $ebay->showdata('smalltd','smallth','_blank',640);
 
  echo '<a href="test_inc_ebay.php?artikelnr='.$item.
 
  '" title="Einzeltest mit dieser Auktion">'.
 
  'Beschreibung anzeigen</a><br /><br style="clear:both">';
 
  
 
} // for( $i=5 (die ersten 5 sind Sofortkäufe)
 
 
?>
 
 
</body>
 
</html>
 
 |