AWR cloud script debuged – SEO

Advanced web ranking AWR cloud script debuged: I have debugged The [get ranking] API call and it works fine on Wamp server 2.4

Observation: DONT’F forget to ALLOW url fopen in you php.ini

            if ($res === TRUE) {
                echo "Could not extract json files from the zip archive";

            $dir_handle = opendir($path_to_extractd_json);

           // var_dump(readdir($dir_handle));

            //Now we can read each extracted json file and output the results
            while (false !== ($entry = readdir($dir_handle)))
                $entry = $path_to_extractd_json.$entry;
                if (!is_file($entry)){ 

                $rankings = json_decode(file_get_contents($entry), true); //Make sure you use associative arrays since the json file contains nested json objects
                //var_dump($rankings); exit;

                //echo "Search Engine: ".$rankings["searchengine"];
                //echo "Search Depth: ".$rankings["depth"];
                //echo "Location: ".$rankings["location"];
                echo "Keyword: ".$rankings["keyword"];
                $rank_data_array = $rankings["rankdata"];

                foreach ($rank_data_array as $rank_data)
                        if (stripos($rank_data["url"], "pricerunner")){
                    echo $rank_data["position"].". ".$rank_data["url"]." result on page ".$rank_data["page"];
                    echo "
"; } } } } } else { echo "No results for date=".$the_date; } } ?>

More info on AWRCLOUD API can be found on their site. The Update action allow to tag your keywords and is very handy but I haven’ tested the script yet. Good coding!