Visualizzazione dei risultati da 1 a 2 su 2
  1. #1
    Utente di HTML.it
    Registrato dal
    Feb 2003
    Messaggi
    1,610

    ot - google key per app php nn va

    questo codice mi fallisce sempre:

    codice:
    if ($query && $www) {
    
      $q = urldecode($query);
      //if ($www != "true") { $q.= " site:$yourWebsite"; }
      if(!$start) { $start=0; } else { $start = intval($start); }
    
      $parameters = array( 
        "key"         => $yourGoogleKey,   // google developer key
        "q"           => $q,               // search query
        "start"       => $start,           // result start index
        "maxResults"  => 10,               // 10 is the maximum
        "filter"      => false,            // filtering similar entries
        "restrict"    => "",               // country and topic restrictions
        "safeSearch"  => false,            // adult content filter
        "lr"          => "",               // language restrictions
        "ie"          => "",               // deprecated and ignored parameter
        "oe"          => ""                // deprecated and ignored parameter
      );
    
    PRINT_R($parameters);
    
      $soapclient = new soapclient("http://api.google.com/search/beta2");
      $result = $soapclient->call("doGoogleSearch", $parameters, "urn:GoogleSearch");
      $begin = $start + 1;
      $end = $start + $parameters["maxResults"];
      $total = $result["estimatedTotalResultsCount"];
    
    PRINT_R($result );
    }
    ... dicendomi chiave non valida la chiave l'ho presa dal sito di google non mi ha datto nessun errore sto testando in localhost
    e quando ho preso la chiave ho selezionato come opzine (application)
    R.

  2. #2

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.