Ankündigung

Einklappen
Keine Ankündigung bisher.

php Designer 8 Fehlermeldung

Einklappen

Neue Werbung 2019

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

  • php Designer 8 Fehlermeldung

    Hallo liebe Gemeinde,

    ich habe eine große Bitte.
    Ich schaffe es einfach nicht folgendes Script zum Laufen zu bringen. Ich hoffe mir kann jemand helfen.
    Mit diesem Programm möchte ich ASINs von Amazon automatisch in meine Wunschliste bei Amazon importieren.
    Die Anleitung, die ich aus dem Netz habe, habe ich weiter unten gepostet. Aus dieser Anleitung ist auch das Programm. Leider habe ich keine Ahnung vom Programmieren.
    Hoffe es kann mir jemand helfen und das Programm so abändern dass es aktuell läuft und mir erklären, wie ich es mit php Designer 8 schaffe, zum Laufen zu bringen.
    Wenn ich das Programm in php Designer 8 ausführen möchte, erhalte ich eine Fehlermeldung, die ich als Screenshot beigefügt habe
    Vielen dank dafür

    PHP-Code:
    <?php
    # add_wishlist_items.php
    # Adds multiple items to an Amazon Wish List
    # Usage: A PHP page called via web browser

    $aff_tag "insert associate tag ";

    error_reporting(E_ERROR E_WARNING);

    if (
    $HTTP_POST_VARS) {
    include 
    "Snoopy.class.inc";
    $snoopy = new Snoopy;

    $snoopy->agent "(compatible; MSIE 4.01; MSN 2.5; AOL 4.0; Windows 9";
    $submit_url "https ://www.amazon.com/exec/obidos/flex-sign-in-done/";

    $submit_vars["email"] = "insert email address ";
    $submit_vars["password"] = "insert Amazon password ";

    $submit_vars["method"] = "get";
    $submit_vars["opt"] = "oa";
    $submit_vars["page"] = "recs/instant-recs-sign-in-standard.html";
    $submit_vars["response"] = "tg/recs/recs-post-login-dispatch/-".
    "/your/pd_ys_fr_ur";
    $submit_vars["action"] = "sign-in";
    $submit_vars["next-page"] = "recs/instant-recs-register-standard.html";

    //submit email and password to start a session
    if($snoopy->submit($submit_url,$submit_vars))
    {
    while(list(
    $key,$val) = each($snoopy->headers)) {
    if (
    preg_match("/session-id=(.*?);/i"$val$ubid)) {
    $session_id $ubid[1];
    }
    }
    } else {
    echo 
    "error fetching document: ".$snoopy->error."\n";
    }

    $snoopyAdd = new Snoopy;
    $snoopyAdd->agent "(compatible; MSIE 4.01; MSN 2.5; AOL 4.0; ".
    "Windows 9";

    $ASIN_list split(",",$_POST['txaASINs']);
    $submit_add["tag-value"] = $aff_tag;
    $submit_add["tag_value"] = $aff_tag;
    $submit_add["submit.add-to-registry.wishlist"] = [RETURN]
    "Add to Amazon.com Wish List";
    $cntAdded 0;
    for(
    $i 0;$i count($ASIN_list); $i++) {
    $thisASIN trim($ASIN_list[$i]);
    $submit_url "http://www.amazon.com/o/dt/assoc/handle-buy".
    "-box=".$thisASIN."/".$session_id;
    $submit_add["asin.".$thisASIN] = "1";
    if(!
    $snoopyAdd->submit($submit_url,$submit_add)) {
    echo 
    "error adding item ".$thisASIN.": ".
    $snoopyAdd->error."<br>\n";
    } else {
    $cntAdded++;
    }
    unset(
    $submit_add[$thisASIN]);
    }
    echo 
    $cntAdded " item(s) added to your wishlist!";
    } else {
    ?>
    <html>
    <head>
    <title>Add Wishlist Items</title>
    </head>

    <body>
    Add a list of ASINs below, separated by commas:
    <br>
    <form action="add_wishlist_items.php" method="post">
    <textarea cols="35" rows="6" name="txaASINs"></textarea>
    <br><input type="submit" value="Add Items">
    </form>
    </body>
    </html>
    <?php ?>

    Diese folgende Erklärung habe ich im Internet gefunden und wollte das Skript im php Designer 8 zum Laufen bringen, was bei mir einfach nicht klappt.

    Speed up the process of adding items to your wish list with a bit of scripting.

    Creating a wish list with 15-20 products is usually a slow process, adding one or two items while you're browsing. Amazon doesn't offer an interface for adding multiple items to a wish list, but you can build one with a bit of scripting. This PHP script accepts a comma-separated list of ASINs and adds them to your wish list all at once.
    20.1 What You Need

    This script relies on automatic form posts, and there are some external PHP tools to speed up this kind of development. Snoopy for PHP is an open source class that handles HTTP requests. You can download a copy from SourceForge (http://sourceforge.net/projects/snoopy/) and include it in the same directory as this script.
    20.2 The Code

    This script runs as a web page and presents a simple form for entering ASINs. Once you enter a list of ASINs, this script performs three main actions:
    1. With the Snoopy PHP class, it simulates a Sign In form post at Amazon with your email address and password to retrieve a session ID.
    2. It then loops through the ASINs.
    3. For each ASIN, it uses Snoopy to send a form post with the variables from the remote wish list form [Hack #19].

    Because you need to be signed in to add items to your wish list, the key to this script is obtaining a 17-digit Amazon session ID [Hack #13] that is associated with your account when you visit the site. Be sure to include your email address and Amazon password in the following code. Your Amazon password will be in the source of the file, so make sure you're the only one with access. You can also insert an associate tag Section 5.2.2 if you have one, to make sure you get a commission on your wish list purchases.
    PHP-Code:
    <?php
    # add_wishlist_items.php
    # Adds multiple items to an Amazon Wish List
    # Usage: A PHP page called via web browser

    $aff_tag "insert associate tag ";

    error_reporting(E_ERROR E_WARNING);

    if (
    $HTTP_POST_VARS) {
    include 
    "Snoopy.class.inc";
    $snoopy = new Snoopy;

    $snoopy->agent "(compatible; MSIE 4.01; MSN 2.5; AOL 4.0; Windows 9";
    $submit_url "https ://www.amazon.com/exec/obidos/flex-sign-in-done/";

    $submit_vars["email"] = "insert email address ";
    $submit_vars["password"] = "insert Amazon password ";

    $submit_vars["method"] = "get";
    $submit_vars["opt"] = "oa";
    $submit_vars["page"] = "recs/instant-recs-sign-in-standard.html";
    $submit_vars["response"] = "tg/recs/recs-post-login-dispatch/-".
    "/your/pd_ys_fr_ur";
    $submit_vars["action"] = "sign-in";
    $submit_vars["next-page"] = "recs/instant-recs-register-standard.html";

    //submit email and password to start a session
    if($snoopy->submit($submit_url,$submit_vars))
    {
    while(list(
    $key,$val) = each($snoopy->headers)) {
    if (
    preg_match("/session-id=(.*?);/i"$val$ubid)) {
    $session_id $ubid[1];
    }
    }
    } else {
    echo 
    "error fetching document: ".$snoopy->error."\n";
    }

    $snoopyAdd = new Snoopy;
    $snoopyAdd->agent "(compatible; MSIE 4.01; MSN 2.5; AOL 4.0; ".
    "Windows 9";

    $ASIN_list split(",",$_POST['txaASINs']);
    $submit_add["tag-value"] = $aff_tag;
    $submit_add["tag_value"] = $aff_tag;
    $submit_add["submit.add-to-registry.wishlist"] = [RETURN]
    "Add to Amazon.com Wish List";
    $cntAdded 0;
    for(
    $i 0;$i count($ASIN_list); $i++) {
    $thisASIN trim($ASIN_list[$i]);
    $submit_url "http://www.amazon.com/o/dt/assoc/handle-buy".
    "-box=".$thisASIN."/".$session_id;
    $submit_add["asin.".$thisASIN] = "1";
    if(!
    $snoopyAdd->submit($submit_url,$submit_add)) {
    echo 
    "error adding item ".$thisASIN.": ".
    $snoopyAdd->error."<br>\n";
    } else {
    $cntAdded++;
    }
    unset(
    $submit_add[$thisASIN]);
    }
    echo 
    $cntAdded " item(s) added to your wishlist!";
    } else {
    ?>
    <html>
    <head>
    <title>Add Wishlist Items</title>
    </head>

    <body>
    Add a list of ASINs below, separated by commas:
    <br>
    <form action="add_wishlist_items.php" method="post">
    <textarea cols="35" rows="6" name="txaASINs"></textarea>
    <br><input type="submit" value="Add Items">
    </form>
    </body>
    </html>
    <?php ?>
    Note the https:// in the section that signs in to Amazon. As the script gets a session ID, the POST is made over an SSL connection?so you can be sure that using this script is as secure as signing in at Amazon personally.
    20.3 Running the Hack

    Add the code to a file called add_wishlist_items.php and upload it to your web server. Bring up the page in your web browser, enter a list of ASINs separated by commas (e.g., 0596004478, 0596004605, 0596004613) and click "Add Items." A page should appear letting you know that three (or however many you entered) items were added to your wish list. Just visit your wish list on Amazon to verify!

    Add the code to a file called add_wishlist_items.php and upload it to your web server. Bring up the page in your web browser, enter a list of ASINs separated by commas (e.g., 0596004478, 0596004605, 0596004613) and click "Add Items." A page should appear letting you know that three (or however many you entered) items were added to your wish list. Just visit your wish list on Amazon to verify!
    Angehängte Dateien

  • #2
    Klingt irgendwie nach Programmierauftrag.

    Kommentar


    • #3
      Moin, das Programm ist doch schon programmiert. Es funktioniert nur noch nicht richtig. Ich denke jemand, der Programmerkenntnisse hat, der erkennt die Fehler und kann mir helfen das Programm zum Laufen zu bringen.
      Vielen dank

      Kommentar


      • #4
        Du schreibst aber selber ( ehrlicher Weise, muss man dazu sagen! ):
        Zitat von Maximus29
        Leider habe ich keine Ahnung vom Programmieren.
        D.h., das Script ist kopiert und evtl. mit gefährlichem Halbwissen angepasst worden, mehr nicht.
        Du suchst jemanden, der Dir das zum Laufen bringt und Dir erklärt, wie es funktioniert. Der PHP Designer 8 hat damit erstmal nichts zu tun, das ist eine IDE, mit der man PHP entwickeln kann.
        Mit der Lauffähigkeit des Scriptes hat das nichts zu tun, da könntest Du überspitzt gesagt auch den Windows-Editor hernehmen.

        Alles in allem übersteigt Deine Anfrage der "Hilfe zur Selbsthilfe"-Intention des Programmierforum, so dass es tatsächlich in der Scriptbörse besser aufgehoben ist.


        [MOD: verschoben von PHP-Einsteiger]
        Competence-Center -> Enjoy the Informatrix
        PHProcks!Einsteiger freundliche TutorialsPreComposed Packages

        Kommentar


        • #5
          Zitat von Maximus29 Beitrag anzeigen
          Moin, das Programm ist doch schon programmiert.
          Wenn es fertig programmiert wäre, würde es doch funktionieren?

          Zitat von Maximus29 Beitrag anzeigen
          Es funktioniert nur noch nicht richtig. Ich denke jemand, der Programmerkenntnisse hat, der erkennt die Fehler und kann mir helfen das Programm zum Laufen zu bringen.
          Was so viel bedeutet wie du suchst einen Programmierer (jemand, der Programmerkenntnisse hat), der für dich programmiert (erkennt die Fehler und kann mir helfen das Programm zum Laufen zu bringen).

          Kommentar


          • #6
            Wäre wirklich nett, wenn mir jemand das programmieren kann, weil ich davon leider keine Ahnung habe. Guten Rutsch

            Kommentar


            • #7
              Du wirst hier niemanden finden, der dir das einfach so schnell fertig macht. Das ist nicht ganz so einfach, wie es scheint. Und ausserdem sind viele hier nur zum Hobby hier und sehen keinen Grund, die spärliche Freizeit an jemanden mit der Motivation eines Steins (sorry) zu unterstützen...

              Du darfst dies gerne in die Jobbörse verschieben lassen und jemanden einen Obulus für die Arbeit offerieren.
              [URL="https://github.com/chrisandchris"]GitHub.com - ChrisAndChris[/URL] - [URL="https://github.com/chrisandchris/symfony-rowmapper"]RowMapper und QueryBuilder für MySQL-Datenbanken[/URL]

              Kommentar


              • #8
                Danke für deine Nachricht. Ich hatte nach einer Lösung im Internet gesucht und das dann gefunden:
                http://etutorials.org/Misc/amazon+t...20+Add+Multiple+Items+to+a+Wish+List+at +Once/
                Da ich wirklich keine Ahnung vom Programmieren habe, hatte ich gehofft, dass das Programm für einen Profi schnell abgeändert werden kann und dann läuft. Dem scheint nicht so zu sein. Ist denn hier einer in der Lage, so ein Programm zu schreiben und mir zu erklären, wie ich es anwenden kann? Selbstverständlich würde ich dafür bezahlen, wenn es erschwinglich ist.
                Würde mich freuen, Angebote zu bekommen.

                Kommentar


                • #9
                  Das Problem bei der Wishlist von Amazon ist, dass es keine API (Programmmierschnittstelle) gibt. Alles was es im Netz so gibt, sind sogenannte Scraper, also Nachbildungen bzw. Emulation eines Browsers, die somit das verhalten eines Users nachbilden müssen. Ändert Amazon nur ein Komma ist das schon hinfällig und darf neu justiert oder programmiert werden.

                  Das dieses Vorgehen wahrscheinlich sogar gegen ihre Richtlinien verstößt, könnte man im Zweifel mit rechtlichen Problemen rechnen oder gesperrt werden.

                  Kommentar

                  Lädt...
                  X