[Coder gesucht] XML-Element(e) auslesen mit PHP4

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • #16
    Ok, hab's nun doch noch selbst zum Laufen bekommen.

    Könnte bitte jemand von euch kurz d'rüber schauen und mir sagen, ob so alles in Ordnung ist? Danke!

    PHP-Code:
    <?php

    include "includes/connect.php";

    include 
    "aws_signed_request.php";

    $getitems="SELECT itemid,asin from phpbb_amazon";

    $getitems2=mysql_query($getitems) or die("Could not get items");

    while(
    $getitems3=mysql_fetch_array($getitems2))

    {

    $pxml aws_signed_request("de", array("Operation"=>"ItemLookup","ItemId"=>$getitems3[asin],"ResponseGroup"=>"OfferSummary","Condition"=>"All","MerchantID"=>"All"), $public_key$private_key);
    if (
    $pxml === False)
    {
        echo 
    "siehe Shop";
            
    $updatecron="Update phpbb_amazon set price='siehe Shop' where itemid='$getitems3[itemid]'";

            
    mysql_query($updatecron) or die("Could not update cron");
            
    mysql_query("Delete from bgook");
            
    usleep(500000);
    }
    else
    {
        if (isset(
    $pxml->Items->Item->OfferSummary->LowestNewPrice->FormattedPrice))
       {
            echo 
    $pxml->Items->Item->OfferSummary->LowestNewPrice->FormattedPrice"\n";
            
    $pricebest $pxml->Items->Item->OfferSummary->LowestNewPrice->FormattedPrice;
            
    $updatecron="Update phpbb_amazon set price='$pricebest' where itemid='$getitems3[itemid]'";

            
    mysql_query($updatecron) or die("Could not update cron");
            
    mysql_query("Delete from bgook");
            
    usleep(500000);

        }
       else
       {
            echo 
    $pxml->Items->Item->OfferSummary->LowestUsedPrice->FormattedPrice"\n";
            
    $pricebestused $pxml->Items->Item->OfferSummary->LowestUsedPrice->FormattedPrice;
            
    $updatecron="Update phpbb_amazon set price='$pricebestused' where itemid='$getitems3[itemid]'";

            
    mysql_query($updatecron) or die("Could not update cron");
            
    mysql_query("Delete from bgook");
            
    usleep(500000);
       }
    }

    }

    ?>

    Kommentar

    Lädt...
    X