SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Not yet perfect mattalexx's Avatar
    Join Date
    Oct 2005
    Location
    Taos, NM, US
    Posts
    441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question connect remotely to mysql db

    I would like to figure out a way to have all of my client's websites connect to a central db (hopefully MySQL) and retrieve shipping costs that way, even if they're not on the same server. This will make it easier if the costs are raised again (like they were on Jan 1). Anybody have any ideas?

    Unless anyone knows of a way to connect to weight => cost USPS shipping info with some other service?

  2. #2
    SitePoint Enthusiast sim3's Avatar
    Join Date
    Dec 2005
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    Essentially a mysql user is created in the central database. In the host field, instead of Localhost, it will be % so that connections from other servers are allowed. It might be a good idea to give that user limited powers - ie, just SELECT etc.

    Then the connecting databases will connect to the central server as that new user, instead of to the "localhost" as they normally would.

    Taking a punt, I think the USPS provide APIs to allow queries like you are suggesting,
    http://www.usps.com/webtools/welcome.htm
    Or you can parse their files:
    http://www.usps.com/ratecase/_csv/Priority.csv
    Additionally, I'm sure with all the ecommerce stuff around you could find a nice straight-forward example somewhere...

    HTH
    Simon

  3. #3
    Not yet perfect mattalexx's Avatar
    Join Date
    Oct 2005
    Location
    Taos, NM, US
    Posts
    441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh my god, thank you for that link to the USPS-hosted web tools! I don't know why I wasn't able to find that before (sounds like they need to rethink their navigation, I say self-centeredly).

  4. #4
    SitePoint Enthusiast sim3's Avatar
    Join Date
    Dec 2005
    Posts
    54
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mattalexx
    oh my god, thank you for that link to the USPS-hosted web tools! I don't know why I wasn't able to find that before (sounds like they need to rethink their navigation, I say self-centeredly).
    I agree, I knew it would be there but I probably clicked every link before I found it (there is a "BUSINESS" link that opens the cookie jar).


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •