6 replies
I would like to be able to get the Alexa rank from specific sites and sort them by the most popular. What coding language do I need to learn to be able to do this?
#alexa or amazon #api
  • Profile picture of the author emptee
    Originally Posted by rodneybrooksjr View Post

    I would like to be able to get the Alexa rank from specific sites and sort them by the most popular. What coding language do I need to learn to be able to do this?
    Anything really...
    {{ DiscussionBoard.errors[10092689].message }}
    • Profile picture of the author freddyDev
      You should first know how to,

      1) Make API request (requesting to fetch the alexa ranking for a page)
      2) Parse the results returned by the server (the results will be in xml or REST format. You should know how to parse it)

      You can learn how to work with api's from Learn | Codecademy

      Once you are comfortable with at least one or two api then try applying the same knowledge to Alexa API
      {{ DiscussionBoard.errors[10092881].message }}
      • Profile picture of the author rodneybrooksjr
        Originally Posted by freddyDev View Post

        You should first know how to,

        1) Make API request (requesting to fetch the alexa ranking for a page)
        2) Parse the results returned by the server (the results will be in xml or REST format. You should know how to parse it)

        You can learn how to work with api's from Learn | Codecademy

        Once you are comfortable with at least one or two api then try applying the same knowledge to Alexa API
        Thanks for the link! So, do you know how to do what I am trying to do? I think it is going to be awhile. I never heard of REST but using that website, I can learn!
        {{ DiscussionBoard.errors[10093437].message }}
    • Profile picture of the author rodneybrooksjr
      Originally Posted by emptee View Post

      Anything really...
      I know HTML and a little bit of PHP. When I was in school, I even created a web browser in VB but I still haven't found somebody teaching what I am trying to do. Maybe I am saying it wrong.
      {{ DiscussionBoard.errors[10093423].message }}
      • Profile picture of the author emptee
        Originally Posted by rodneybrooksjr View Post

        I know HTML and a little bit of PHP. When I was in school, I even created a web browser in VB but I still haven't found somebody teaching what I am trying to do. Maybe I am saying it wrong.
        Gotcha - either VB or PHP should do the trick nicely..

        Make a request that looks something like this:

        http://xml.alexa.com/data?cli=10&dat...rriorforum.com

        You'll get back an XML document looking something like this:


        <?xml version="1.0" encoding="UTF-8"?>

        <ALEXA VER="0.9" URL="warriorforum.com/" HOME="0" AID="=" IDN="warriorforum.com/">
        <RLS PREFIX="http://" more="0">
        <RL HREF="digitalpoint.com/" TITLE="Digital Point Solutions"/>
        <RL HREF="warriorpro.com/" TITLE="Warriorpro"/>
        <RL HREF="squidoo.com/" TITLE="Squidoo"/>
        <RL HREF="iranjava.net/" TITLE="Iranjava.net"/>
        <RL HREF="getresponse.com/" TITLE="GetResponse Email Marketing"/>
        <RL HREF="ezinearticles.com/" TITLE="EzineArticles.com"/>
        <RL HREF="clickbank.com/" TITLE="Digital Products Retailer: Affiliate Program &amp; Sell Online - ClickBank"/>
        <RL HREF="aweber.com/" TITLE="AWeber Systems"/>
        <RL HREF="angelasdiscountmarket.com/" TITLE="Angelas Discount Market"/>
        <RL HREF="www.webpronews.com/" TITLE="WebProNews"/>
        </RLS>
        <SD TITLE="A" FLAGS="" HOST="warriorforum.com">
        <TITLE TEXT="The Warrior Forum"/>
        <OWNER NAME="Internet Warriors"/>
        </SD>
        <SD>
        <POPULARITY URL="warriorforum.com/" TEXT="1047" SOURCE="panel"/>
        <REACH RANK="1095"/>
        <RANK DELTA="+200"/>
        <COUNTRY CODE="IN" NAME="India" RANK="520"/>
        </SD>
        </ALEXA>

        Then just parse out the rank (1047 in this case).

        If you're using VB.NET, webrequest can make the request, XMLDocument can be used to parse.. for PHP, you can use CURL or simply file_get_contents to get the XML, parsing.. I don't know, I haven't parsed XML in PHP (I'm a JSON kinda guy..). A quick google for php + parse XML should give you the info you need

        Cheers,
        Michael
        {{ DiscussionBoard.errors[10093789].message }}
        • Profile picture of the author rodneybrooksjr
          Originally Posted by emptee View Post

          Gotcha - either VB or PHP should do the trick nicely..

          Make a request that looks something like this:

          http://xml.alexa.com/data?cli=10&dat...rriorforum.com

          You'll get back an XML document looking something like this:


          <?xml version="1.0" encoding="UTF-8"?>

          <ALEXA VER="0.9" URL="warriorforum.com/" HOME="0" AID="=" IDN="warriorforum.com/">
          <RLS PREFIX="http://" more="0">
          <RL HREF="digitalpoint.com/" TITLE="Digital Point Solutions"/>
          <RL HREF="warriorpro.com/" TITLE="Warriorpro"/>
          <RL HREF="squidoo.com/" TITLE="Squidoo"/>
          <RL HREF="iranjava.net/" TITLE="Iranjava.net"/>
          <RL HREF="getresponse.com/" TITLE="GetResponse Email Marketing"/>
          <RL HREF="ezinearticles.com/" TITLE="EzineArticles.com"/>
          <RL HREF="clickbank.com/" TITLE="Digital Products Retailer: Affiliate Program &amp; Sell Online - ClickBank"/>
          <RL HREF="aweber.com/" TITLE="AWeber Systems"/>
          <RL HREF="angelasdiscountmarket.com/" TITLE="Angelas Discount Market"/>
          <RL HREF="www.webpronews.com/" TITLE="WebProNews"/>
          </RLS>
          <SD TITLE="A" FLAGS="" HOST="warriorforum.com">
          <TITLE TEXT="The Warrior Forum"/>
          <OWNER NAME="Internet Warriors"/>
          </SD>
          <SD>
          <POPULARITY URL="warriorforum.com/" TEXT="1047" SOURCE="panel"/>
          <REACH RANK="1095"/>
          <RANK DELTA="+200"/>
          <COUNTRY CODE="IN" NAME="India" RANK="520"/>
          </SD>
          </ALEXA>

          Then just parse out the rank (1047 in this case).

          If you're using VB.NET, webrequest can make the request, XMLDocument can be used to parse.. for PHP, you can use CURL or simply file_get_contents to get the XML, parsing.. I don't know, I haven't parsed XML in PHP (I'm a JSON kinda guy..). A quick google for php + parse XML should give you the info you need

          Cheers,
          Michael
          Thanks, Michael, by you posting that code, I got a better picture! So far, I know I need a database, Alexa data that updates and a way to sort it by the lowest number but I don't think I am asking the right questions so here is a link that better explains.

          http://rodneybrooksjr.com/opportunities/list/

          As you can see the height on Alexa's widget is taller than the banner. I just want the actual number. You showed me with the link but don't you have to sign up with AWS, I did and I clicked on RDS. I don't know if that is the right one, could you please tell me the steps I need to take to accomplish what I am trying to do.
          {{ DiscussionBoard.errors[10096884].message }}

Trending Topics