MichDe / seostats

Automatically exported from code.google.com/p/seostats
0 stars 0 forks source link

Alexa functions return parts of html code instead of numbers only #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Most methods return parts of html code instead of numbers. 
For example echo $obj->AlexaGlobalRank(); returns:

<img style="margin-bottom: -2px;" alt="Global" 
src="http://www.alexa.com/images/icons/globe-sm.jpg">
7,199 

instead of expected 7199

because of this its hard to use this class in live applications without 
rewriting   

Original issue reported on code.google.com by valerchi...@gmail.com on 16 Dec 2010 at 12:15

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks again for your feedback.

For the functions AlexaGlobalRank and AlexaCountryRank i can adjust the 
function so it only returns the pure numeric results.

For the other Alexa functions i will try to solve it that way: Using an extra 
class var to determine whether to receive the results as html table, or as an 
array.

Original comment by eyecatchup@gmail.com on 16 Dec 2010 at 3:54

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Update released:

* AlexaGlobalRank and AlexaCountryRank now return the pure numeric results only.
* Alexa Stats and Trends functions return results as array:
{{{
Array
(
    [1 Month] => Array
        (
            [value] => xxx
            [change] => +/- xx %
        )

    [3 Months] => Array
        (
            [value] => xxx
            [change] => +/- xx %
        )

)
}}}

Original comment by eyecatchup@gmail.com on 17 Dec 2010 at 12:55

GoogleCodeExporter commented 9 years ago

Original comment by eyecatchup@gmail.com on 17 Dec 2010 at 12:56