API to find specs of a mac by serial number

Discussion in 'OS X Mavericks (10.9)' started by Bolzenheim, Dec 5, 2013.

  1. Bolzenheim macrumors newbie

    Joined:
    Nov 28, 2013
    #1
    Hi Guys

    I wrote a small php tool to manage the macs of my company. On part of it is that all Macs report their system serial number to this application which stores it in a DB.
    I would really like to provide some informations about the Mac from within the application, so for example that it's an iMac from 2011. I hope you understand;)

    Do you now any service in the web with a documented API where you can submit a serial and receive informations about the mac automatically?

    I know "everymac.com" and the normal apple support coverage tool but, AFAIK none of them provides an official API.
    I also wrote the guys from everymac.com but did not receive an answer.

    Best regards

    Bolzenheim
     
  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    http://www.mactracker.ca

    This app provides Mac specifications. I don't know if there is a way you could pull the info you need from there maybe.
     
  3. Bolzenheim thread starter macrumors newbie

    Joined:
    Nov 28, 2013
    #3
    Hi Everyone

    Thank you Weaselboy for your reply and sorry that it took me very long to answer.
    In the meantime I found another solution which surely isn't perfect but it works well for now.

    1.) I send the http request with the corrct get-string (last 3 / 4 numbers of the serial) to the website everymac.

    2.) I parse the request with the simple php html dom parser

    3.) Search for the specific html tag

    4.) Extract the table with the informations by tag and include this string in my website.

    Do you know if I am violating any copyright regulations with this method? (as I said: My application is only for internal use)

    Best regards
     
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
    Just from a quick read of their terms of service (TOS), it probably does. That said, if it is just for occasional, personal use I doubt they would care to do anything about it.
     
  5. Bear macrumors G3

    Joined:
    Jul 23, 2002
    Location:
    Sol III - Terra
    #5
  6. Bolzenheim thread starter macrumors newbie

    Joined:
    Nov 28, 2013
    #6
    Hi Bear and Weaselboy

    Many thanks for your replies.
    I read that it could be problematic to use the site in the way I do but, as you said, I think I'll stick with that solution anyway for the moment.

    I think it could be a next project to build an open database of serialnumbers for identification, but not this time;)

    Anyway, thank you Bear for the interesting articles!

    Best regards
     
  7. karolbagus macrumors newbie

    Joined:
    Feb 26, 2015
    #7
    hi all,
    I need to build an open database of serialnumbers for identification on website. Google give me this tread and Bolzenheim that was your mind ;)
    How to make this? I know some php, mysql, html and css but don't know how to start with this.
     
  8. SlCKB0Y macrumors 68040

    SlCKB0Y

    Joined:
    Feb 25, 2012
    Location:
    Sydney, Australia
    #8
    You are over complicating it. If the Macs are reporting their serial number, why not just have them report their specs as well?
     

Share This Page