Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6546767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:44:56+00:00 2026-05-25T11:44:56+00:00

I am parsing contacts from Gmail, and creating a sync functionality with my product.

  • 0

I am parsing contacts from Gmail, and creating a sync functionality with my product.
But on my script i’m having a hard time determining which contacts get ‘deleted’ from gmail.

EXAMPLE:
If I have John Doe in my Application, along with Gmail… (and they are synced with the gmailId). Later on down the road, if the user DELETES the contact John Doe, and I run my SYNC, how do I determine that the contact was deleted?

I need to know where to throw a trigger to delete the same contact within my database. I currently have this to obtain information on each contact sent through.

$xml = simplexml_load_string($entry->getXML());
$obj = new stdClass;

//    EDIT LINK
$obj->gmailUrl   = rawurlencode($entry->id);                
$obj->delete     =  (string) $xml->groupMembershipInfo['deleted'];

//    FIRST Name
$obj->firstName  = (string) $xml->name->givenName;

Previous in my code i’m also query google with these extra params.

$query->setParam('updated-min', $updatedMin);
$query->setParam('showdeleted', 'true');
$query->setParam('requirealldeleted', 'true');

Any help would be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:44:56+00:00Added an answer on May 25, 2026 at 11:44 am

    I found out that Google adds an empty XML Tag called Deleted when a contact is deleted.

    Something like this.

    if(isset($xml->deleted)) { $deleted = "true"; } else { $deleted = NULL; } 
    $obj->delete = $deleted;
    

    Although Adrian’s solution would work, I felt that wasn’t the best solution as I felt Google must to have an answer for this rather than checking to see if a contact was available every day.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing text from a file and storing it in a string. The problem
I'm looking at parsing a delimited string, something on the order of a,b,c But
I am parsing an RSS feed from the following URL: http://rss.sciam.com/ScientificAmerican-Global?format=xml // $xml_text is
I was doing Json parsing. As of now, I was reading it from a
I am using contactsreader.dll to import my Gmail contacts. One of my method has
I am parsing an XML feed from Google using beautifulstonesoup and python, and it
I'm having a bit of an issue. I'm parsing a large xml file using
I'm having some problems in passing context from the app delegate to the view
I am having URL of PHP file from where i am getting all data
Parsing a text file in vb.net and need to locate the latitude and longitude

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.