1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Simple Alexa Rank Retrieval

Discussion in 'PHP' started by -NB-, Feb 10, 2007.

  1. kojakfilth

    kojakfilth Notable Member

    Messages:
    3,000
    Likes Received:
    213
    Best Answers:
    0
    Trophy Points:
    210
    #21
    can anyone teach me where to put this codes.. ? im lost.. :(
     
    kojakfilth, Mar 28, 2007 IP
  2. The Reckoning

    The Reckoning Peon

    Messages:
    862
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #22
    Old post, but I thought I'd bring it back up.
    Put this code in a PHP file and include it into your page.
    Then do what -NB- said and
    echo getAlexaRank('http://www.yoursite.com/');
    Code (markup):
    By the way -NB-, shame on you for stealing my code! I showed you how to do this and did not want it passed around the internet :(
     
    The Reckoning, Apr 27, 2007 IP
  3. kojakfilth

    kojakfilth Notable Member

    Messages:
    3,000
    Likes Received:
    213
    Best Answers:
    0
    Trophy Points:
    210
    #23
    Can you give me a preview of what this code do.. please...
     
    kojakfilth, Apr 27, 2007 IP
  4. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #24
    PHP5:
    
    function hmm($url) {
    $xml = simplexml_load_file('http://data.alexa.com/data?cli=10&dat=s&url=' . $url);
    return $xml->SD->POPULARITY['TEXT'];
    }
    
    echo hmm('digitalpoint.com');
    PHP:
    Sorry if it's old :)
     
    decepti0n, Apr 27, 2007 IP
  5. Subikar

    Subikar Active Member

    Messages:
    241
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    60
    #25
    That Awesome code thanks for sharing with us.
     
    Subikar, Apr 28, 2007 IP
  6. jquindlen

    jquindlen Notable Member

    Messages:
    1,725
    Likes Received:
    112
    Best Answers:
    0
    Trophy Points:
    220
    Digital Goods:
    1
    #26
    Thanks, I appreciate it ;) . What license is this code released under?
     
    jquindlen, Apr 28, 2007 IP
  7. kojakfilth

    kojakfilth Notable Member

    Messages:
    3,000
    Likes Received:
    213
    Best Answers:
    0
    Trophy Points:
    210
    #27
    im really clueless about this php.. is this the code for increasing the alexa rank? or just display the alexa rank in your site?
     
    kojakfilth, Apr 28, 2007 IP
  8. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #28
    It's just displaying it
     
    decepti0n, Apr 28, 2007 IP
  9. The Reckoning

    The Reckoning Peon

    Messages:
    862
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #29
    decepti0n, most people here have PHP4 and SimpleXML does use quite a bit of resources :)
     
    The Reckoning, Apr 29, 2007 IP
  10. mnymkr

    mnymkr Well-Known Member

    Messages:
    2,328
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    120
    #30
    how could you incorporate this into dynamic links....like in a small self made directory
     
    mnymkr, Apr 29, 2007 IP
  11. The Reckoning

    The Reckoning Peon

    Messages:
    862
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #31
    Next to each URL do this, echo getAlexaRank($url_variable);
     
    The Reckoning, Apr 29, 2007 IP
  12. manilodisan

    manilodisan Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #32
    manilodisan, Apr 29, 2007 IP
  13. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #33
    Barti1987, Apr 30, 2007 IP
  14. chorizo

    chorizo Peon

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #34
    Sooooo...

    I know I can get stuff like domain owner contact info if I have an account and use the Alexa API (like manilodisan's script); does anyone know if this is available using the scripts above from aditya_sfs or -hb- ?
     
    chorizo, May 9, 2007 IP
  15. The Reckoning

    The Reckoning Peon

    Messages:
    862
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #35
    Don't think so, this is for domain statistics from Alexa.
     
    The Reckoning, May 9, 2007 IP