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

110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<?php
$project_name = "your-site.com";
//Build the request URL. Include your API token and the project name. This call retrieves
// https://www.awrcloud.com/sync.php?action=get_dates&token=your-token&project_name=your-site.com
$url = 'https://www.awrcloud.com/sync.php?action=get_dates&token=your-token&project_name='.$project_name;
 
//your-token
$response = json_decode(file_get_contents($url),true);
 
//Now we have the available update dates for the requested project as arrays containg a date value and the search depth
$dates = $response["dates"];
 
foreach ($dates as $date_item) {
    $the_date = $date_item["date"];
    $search_depth = $date_item["depth"];
 
    //Now we can list the rankings for each of those dates. You can specify the result type, which can be json or html.
    $url = "https://www.awrcloud.com/get.php?action=list&project=".$project_name."&date=".$the_date."&token=your-token&type=json&compression=zip";
    // https://www.awrcloud.com/sync.php?action=list&date=2014-01-09&token=your-token&project_name=your-site.com&type=html
 
    //echo $url = "https://www.awrcloud.com/get.php?action=list&project=your-site.com&date=".$the_date."&token=your-token&type=json";
    $s = file_get_contents($url);
    //var_dump ($s);
 
    $ranking_results_response = json_decode($s, true);
 
    //var_dump ($ranking_results_response);
 
    //$response_rows = explode("\n", $ranking_results_response);
    $response_rows = explode("\n", $s);
 
    // var_dump ($response_rows);
 
    if ($response_rows[0] == "OK") //We have results available for this date and project
    {
        $row_count = $response_rows[1]; //Check how many response files are available for this date
        if ($row_count == 0)
            continue; //We have no results for this date
 
        for ($i = 0; $i < $row_count; $i++)
        {
            $url_request =  $response_rows['2'+$i];
            //echo $url_request;
 
            $url_handle = fopen($url_request, 'r');//Open as read only. 
            // https://www.awrcloud.com/get.php?action=get&project=your-site.com&token=your-token&date=2014-01-08&type=json&compression=zip&file=0.tar.xz
            // The request returns a zip file with multiple rankings for the requested project
 
            $temp_zip = fopen("tempfile.zip", "w");
 
            while (!@feof($url_handle))
            {
                $read_chunk = fread($url_handle, 1024*8);
                fwrite($temp_zip, $read_chunk);
            }
            fclose($temp_zip);
            fclose($url_handle);
 
            $path_to_extractd_json = "./unzip/";
 
            $zip = new ZipArchive;
            $res = $zip->open('tempfile.zip');
            if ($res === TRUE) {
                $zip->extractTo($path_to_extractd_json);
                $zip->close();
            }
            else
            {
                echo "Could not extract json files from the zip archive";
                continue;
            }
 
            $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)))
            {
                //var_dump($entry); 
                $entry = $path_to_extractd_json.$entry;
                if (!is_file($entry)){ 
                continue;
                }
 
                $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 "<br>";
                    }
                } 
            }
        }
    }
    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!

http://www.advancedwebranking.com/online/developer-api.html



rich snippets with price

http://www.pricerunner.se/tests/Electrolux-Ergospace-ZE310-priser.html is a try out to get the price rich snippet in place.



Recap of the SMX paris 2012

There have been some interesting information being shared at the smx paris 2012… not much – The Google employees that attended didn’t stick around very long – but isn’t networking the real intent of these conferences. Anyway, here is a quick recap of the most interesting decks (in french ofcourse). No pictures taken because I had forgotten my new SLR camera but I had my latop (more…)



Why should you crash the SMX Paris?

SMX Paris? A glass of wine, a slice of cheese and a slice of penguin in my sandwich…

One week to go before the SMX Paris! There will be the Seattle advanced SMX 2 days earlier and then Paris. But why should you pack you bag and get there?

(more…)



Google Penguin Update explained in video

I guess the Update is weel described here. It is a tough time for small affiliates…

Visit my services Page



Blogg.se falls from the serp and penguin rises

Is Blogg.se drop to be accounted to the Penguin’s update?

The context:

The drop in visibility in the search results of Blogg.se is making swedish SEOs chat.
Blogg.se is a major blogging platform in Sweden and sunk in the SERPs making a couple ripples…

Ok, so is Blogg.se drop to be accounted to the Penguin’s update?
(more…)



how do search engines treat NoScript links

How does Google treat NoScript links?

The Context:
It is not advised to use < Noscript > tags as it is an easy way to hide links or content. Most people Have Javascript activated and will not see the content included in the noscript tags.

1
<noscript>Hidden content when Javascript is not activated</noscript>

(more…)



how do search engines treat javascript links

Can Google decrypt base64 encoded links?

The Set up:

In a page, we embed a javascript code able to decode a couple of encoded base64 links.
I wondered:

  • Is Google able to run the complex JS code we are giving?
  • If the links are discovered, are the target pages going to be indexed?
  • Is any page rank going to be flowed though the Javascript links?

(more…)



Drop of rankings after hosting a malware

A UK site got infected by a malware. A couple days later, its ranking were gone. Traffic down 70%.

Mid October, a UK site got infected by a malware. The malware spread though the ad serving system to different page types. The development team cleaned up the malware and patched the system in a day. After having cleaned up the site from the malware, I requested a malware review from the webmaster tools console.

Google resources:

www.google.com/support/webmasters/bin/answer.py?answer=163634

www.google.com/support/webmasters/bin/answer.py?answer=163633

(more…)



Looking for geo proxies to use with Advanced Web Ranking

I have been using trusted proxies that offers geo located proxies and parallel proxies for quickly set up rank reports. I am quite pleased with it.

Update:

I am not using AWR Cloud instead of the desktop version. It saves the cost on the proxies but it costs more… Your take.

/2011/11/looking-for-proxies-to-use-with-advanced-web-ranking/



RECENTLY BLOGGED ABT

TWEETS

  • My twitter:

Test of NS:

I will try to insert different elements into it:

Broken TWiTTs :(

  •  

AUTHOR

  • Hervé Le TurduMy name is Herve Le Turdu.
    I am a 32 years old french* man with an inquiring mind and an enthusiastic personality. Get to know me better !

    *Pardon my English tainted with a strong accent and of many mistakes

Projects & Work

LINKS - BeCause they deserve it!

I Love SEOgadget ----------------------------------------------------
Testing stuff:
http://leturdu.com/

Test 1 // show post ID: 349

Test 2 // show category page: SEO