Ciao a tutti,
per un programma sto realizzando delle API e mi piacerebbe monitorarne l'uso da parte degli utenti...
L'API restituisce risultati in XML.
Conoscete statcounter? Bene, ho provato ad inserire all'interno della mia api il codice di statcounter ma va in errore il parser XML completamente....
Vi posto il codice, vi sarei grato se poteste indirizzarmi verso qualche workaround...
Codice PHP:
include ('constant.inc.php');
include ('library.php');
include ('statistiche.php'); // <= e qui sta l'incriminato
$username = addslashes($_POST['username']);
$password = addslashes(sha1($_POST['password']));
$result = checkUser($username,$password);
if ($result) {
$type = addslashes($_POST['type']);
switch($type) {
case 'test':
include('API-test.php');
break;
} // switch
} // if ($result)
Codice PHP:
<script type="text/javascript">
var sc_project=xxxxxxx;
var sc_invisible=1;
var sc_security="xxxxxxxx";
</script>
<script type="text/javascript"
src="http://www.statcounter.com/counter/counter_xhtml.js"></script>
<noscript><div class="statcounter">[url="http://statcounter.com/godaddy_website_tonight/"][img]http://c.statcounter.com/xxxxxxxx/0/exxxxxxxx/1/[/img][/url]</div></noscript>
grazie in anticipo!