Pull gmail contacts into mysql database

I need to have the ability to see all my contacts in my mysql database.  How can I set this up?  I generally use phpMyAdmin to access the database online directly.
frugalmuleAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
First export all of your contacts in CSV format.  I suggest using the Google format because there are fewer fields.  Then you need to create a new table in phpMyAdmin with the correct number and type of fields and the proper names for the columns.  Then you can import them into it thru the import tab.
0
frugalmuleAuthor Commented:
I want this to happen directly in real time so that when I add contact data or edit contact data the changes are reflected in the database as well.
0
Dave BaldwinFixer of ProblemsCommented:
I don't believe that will ever happen.
0
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
You should be able to use the google contacts api https://developers.google.com/google-apps/contacts/v3/#retrieving_all_contacts

HTTP/1.1 200 OK
Content-Type: application/atom+xml; charset=UTF-8; type=feed
...

<feed xmlns='http://www.w3.org/2005/Atom'
    xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
    xmlns:gContact='http://schemas.google.com/contact/2008'
    xmlns:batch='http://schemas.google.com/gdata/batch'
    xmlns:gd='http://schemas.google.com/g/2005'
    gd:etag='feedEtag'>
  <id>userEmail</id>
  <updated>2008-12-10T10:04:15.446Z</updated>
  <category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact'/>
  <title>User's Contacts</title>
  <link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml'
      href='https://www.google.com/m8/feeds/contacts/userEmail/full'/>
  <link rel='http://schemas.google.com/g/2005#post' type='application/atom+xml'
      href='https://www.google.com/m8/feeds/contacts/userEmail/full'/>
  <link rel='http://schemas.google.com/g/2005#batch' type='application/atom+xml'
      href='https://www.google.com/m8/feeds/contacts/userEmail/full/batch'/>
  <link rel='self' type='application/atom+xml'
      href='https://www.google.com/m8/feeds/contacts/userEmail/full?max-results=25'/>
  <author>
    <name>User</name>
    <email>userEmail</email>
  </author>
  <generator version='1.0' uri='http://www.google.com/m8/feeds'>
    Contacts
  </generator>
  <openSearch:totalResults>1</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  <openSearch:itemsPerPage>25</openSearch:itemsPerPage>
  <entry gd:etag='contactEtag'>
    <id>
      http://www.google.com/m8/feeds/contacts/userEmail/base/contactId
    </id>
    <updated>2008-12-10T04:45:03.331Z</updated>
    <app:edited xmlns:app='http://www.w3.org/2007/app'>2008-12-10T04:45:03.331Z</app:edited>
    <category scheme='http://schemas.google.com/g/2005#kind'
        term='http://schemas.google.com/contact/2008#contact'/>
    <title>Fitzwilliam Darcy</title>
    <gd:name>
      <gd:fullName>Fitzwilliam Darcy</gd:fullName>
    </gd:name>
    <link rel='http://schemas.google.com/contacts/2008/rel#photo' type='image/*'
        href='https://www.google.com/m8/feeds/photos/media/userEmail/contactId'
        gd:etag='photoEtag'/>
    <link rel='self' type='application/atom+xml'
        href='https://www.google.com/m8/feeds/contacts/userEmail/full/contactId'/>
    <link rel='edit' type='application/atom+xml'
        href='https://www.google.com/m8/feeds/contacts/userEmail/full/contactId'/>
    <gd:phoneNumber rel='http://schemas.google.com/g/2005#home'
        primary='true'>
      456
    </gd:phoneNumber>
    <gd:extendedProperty name='pet' value='hamster'/>
    <gContact:groupMembershipInfo deleted='false'
        href='http://www.google.com/m8/feeds/groups/userEmail/base/groupId'/>
  </entry>
  <!-- Other entries ... -->
</feed>

Open in new window


You would use the list generated to update your database.   If you have not used this before, perhaps it would be a good idea to make a separate question just getting this part to work.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
frugalmuleAuthor Commented:
thanks for the script, but I don't have any reference for how that would actually work. Perhaps you could show it in a video
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development

From novice to tech pro — start learning today.