werwiewas29
Mitglied
Hallo, ich hab da ne Code um Alexa Rank auszulesen. es kommt auch ne Zahl raus. aber woher weiß ich das die Richtig is. wo kann man da auf der Page nachschaun?
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature currently requires accessing the site using the built-in Safari browser.
<? // Trage hier deine oder auch eine andere Website ein
$url = "http://www.spiegel.de";
// Die Alexa seite wo der Alexa Rank abgefragt wird
$alexa_url = 'http://data.alexa.com/' . 'data?cli=10&dat=snbamz&url=' . $url;
// Abfrage wird getätigt
$sAbfrage = file_get_contents($alexa_url);
// Antwort wird herausgefiltert
$alexa_prüfsyntax = '/" TEXT="((\d|\,)+?)"/'; preg_match($alexa_prüfsyntax, $sAbfrage, $alexa_antwort);
// Altwort wird überprüft
if(!isset($alexa_antwort[1])) { $alexa_antwort[1] = '-'; }
// Antwort ausgeben
echo "<br /> "; echo ": ".number_format($alexa_antwort[1]).""; echo "<br /> <BR /> ";
?>
<?
$url = "http://www.salzburg.com";
$keyword = "";
$content = "";
research ($url,$keyword,$content);
function research ($url,$keyword,$content){
// Trage hier deine oder auch eine andere Website ein
$url = "";
$keyword = "";
$content = "";
// Die Alexa seite wo der Alexa Rank abgefragt wird
$alexa_url = 'http://data.alexa.com/' . 'data?cli=10&dat=snbamz&url=' . $url;
// Abfrage wird getätigt
$sAbfrage = file_get_contents($alexa_url);
// Antwort wird herausgefiltert
$alexa_prüfsyntax = '/" TEXT="((\d|\,)+?)"/'; preg_match($alexa_prüfsyntax, $sAbfrage, $alexa_antwort);
// Altwort wird überprüft
if(!isset($alexa_antwort[1])) { $alexa_antwort[1] = '-'; }
// Antwort ausgeben
return "<br /> "; return": ".number_format($alexa_antwort[1]).""; echo "<br /> <BR /> ";
return": ".number_format($alexa_antwort[1])."";
// check: http://www.alexa.com/siteinfo
}
?>
Das war kein ScherzBitte, bitte den Code in Zukunft in [PHP]mein Code[/PHP] setzen