Visualizzazione dei risultati da 1 a 8 su 8
  1. #1

    Valore adsense di google con api

    Avevo letto che esiste un modo per usare la classe nusoap.php per tirar fuori i valori delle pubblicità di google tramite le api


    Qualcuno ne è a conoscenza ??

  2. #2
    Utente di HTML.it L'avatar di chris
    Registrato dal
    Sep 1999
    Messaggi
    1,568
    Ehm, primo risultato della ricerca con google.
    http://www.google.com/search?num=20&...rch&lr=lang_it

  3. #3
    Chris ma non mi da i valori delle pubblicita di adsense

  4. #4
    ho trovato questo :


    http://google-apility.sourceforge.net/


    ma non capisco come fare a farlo funzionare

  5. #5

  6. #6
    sto proprio provando ad usare quelle ora :

    Codice PHP:
    <?

    // Copyright 2005, Google Inc. All rights reserved.

    require_once('nusoap.php');

    /*
     * This sample program illustrates how to get traffic estimates for keywords.
     * This program uses nusoap.php to handle the SOAP interactions.
     */

    // Set up the authentication headers
    $email "<email>qui ci metto lamail</email>";
    $password "<password>qui la passo</password>";
    $userAgent "<useragent>YOURCOMPANY -- PHP Traffic Estimator Demo</useragent>";
    $token "<token>developer_token_here</token>";
    $header $email $password $userAgent $token;

    // Connect to the WSDL for the TrafficEstimatorService
    $wsdl "https://adwords.google.com/api/adwords/v2/TrafficEstimatorService?wsdl";
    $client = new soapclient($wsdl'wsdl');

    // Set the headers; they are needed for authentication
    $client->setHeaders($header);

    // With nusoap, you need to include XML with the parameters
    $keyword0 "<text>flowers</text>";
    $keyword1 "<text>chocolates</text>";
    $otherinfo "<maxCpc>50000</maxCpc><type>Broad</type>";

    // Need to keep track of the order that we send in the keywords
    // so we can match them to the results
    $keywordTextArray[0] = "flowers";
    $keywordTextArray[1] = "chocolates";

    $otherinfo "<maxCpc>50000</maxCpc><type>Broad</type>";
    $keywordxml "<KeywordRequest> $keyword0 $otherinfo </KeywordRequest><KeywordRequest> $keyword1 $otherinfo</KeywordRequest>";

    // Construct the XML string for the parameters
    // It's a nusoap thing that the param string needs to include the operation name too
    // Specifying the namespace is optional, AdWords API web services can use the default namespace
    // $param = "<estimateKeywordList xmlns='https://adwords.google.com/api/adwords/v2'>" . $keywordxml . "</estimateKeywordList>";
    $param "<estimateKeywordList>" $keywordxml "</estimateKeywordList>";

    // Make the request to estimate the keywords
    $response $client->call("estimateKeywordList"$param);
    $response $response['estimateKeywordListReturn'];

    // If the headers hadn't been set already, you'd need to provide them in the call to call()
    // $response = $client->call("estimateNewAdGroup", $param, false, false, $header);

    // Handle any SOAP faults.
    if ($client->fault) {
        echo 
    "

    FAULT:  
    {$client->fault}
    \n"
    ;
        echo 
    "

    Code: 
    {$client->faultcode}
    \n"
    ;
        echo 
    "

    String: 
    {$client->faultstring}
    \n"
    ;
        echo 
    "

    Detail: 
    {$client->faultdetail}
    \n"
    ;
        return;
    }

    // If we got this far, $response contains the estimates
    $count count($response);
    echo 
    "

    There are " 
    $count " elements in the response array.
    \n"
    ;

    // A single  response is returned as an array of field values.
    // Multiple responses are returned as an array of arrays.
    if(is_array($response)) {
        echo 
    "

    We have an array of responses, need to iterate over them.
    \n"
    ;
            
    $i 0;

            while (
    $i $count) {
                
    // Need to get the keyword text out of $keywordTextArray
                    // because the keywordEstimate doesn't know the keyword text
                
    echo "<H3>" $keywordTextArray[$i] . "</H3>";
                
    printResults($response[$i]);
                    
    $i++;
        }
    }
    else {     
    // only a single response
            // echo "<H3>ONE RESPONSE</H3>";
            // echo "<H3>" . $thiskeyword . "</H3>";
            
    printResults($response);
    }

    function 
    printResults ($estimate) {
        echo 
    "<blockquote>";
        echo 
    "\n
    cpc = " 
    $estimate['cpc'];
        echo 
    "\n
    clicks = " 
    $estimate['ctr'] * $estimate['impressions'];
        echo 
    "\n
    ctr = " 
    $estimate['ctr'];
        echo 
    "\n
    impressions = " 
    $estimate['impressions'];
        echo 
    "\n
    notShown = " 
    $estimate['notShownPerDay'];
        echo 
    "\n
    position = " 
    $estimate['avgPosition'];
        echo 
    "</blockquote>
    \n"
    ;
    }
    ?>
    il problema è che non mi restituisce nulla

    gli emtto la sua api ma non mi da nulla

  7. #7
    io vado qui :

    http://www.google.com/apis/adwords/

    per registrare un account da sviluppatore e avaere la api ma non capisco come fare per registrarmi

  8. #8
    ci sono riuscito !!!!!!!!!!!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.