📬

Gmail & Alert News Parser

Automated Gmail Fetching, Regex News Digest Parsing, Silent Refresh Token Sync & FCM Push

PHP 8.2.36 ✓ Google OAuth Ready ✓ FCM Push Ready ⚡ Silently Authenticated (via Refresh Token)
Total News Articles
18
Stored in MySQL (emails table)
Google Alerts Parsed
18
Flattened via Regex parser
Active Mobile Devices
35 / 38 registered
Push notifications enabled
Google Refresh Token
Active ✓
Ready for automatic silent sync
Log Out

Centre plans toll exemption via FASTags for armed forces' private vehicles - Mint

MoRTH has initiated discussions with the defence ministry to develop a mechanism for recognizing eligible private vehicles without disrupting traffic ...

Building future-ready highways: Why quality assurance matters - The Financial Express

... Ministry of Road Transport and Highways (MoRTH) specifications, Indian Roads Congress (IRC) standards and project-specific contractual ...

Union Minister Nitin Gadkari Performs Bhoomipujan of Multi-Modal Logistics

Press Release: Press Information Bureau Wardha, November 1, 2026: Union Minister for Road Transport and Highways Nitin Gadkari said that the Multi-Modal Logistics Park being developed at ...

Conrad discusses NH-217 repair works with MoRTH Secretary - Hub News

Shillong, Oct 31: Chief Minister Conrad K Sangma on Saturday met the Secretary, Ministry of Road Transport and Highways (MoRTH) to discuss repair ...

Centre plans toll exemption via FASTags for armed forces' private vehicles - Mint

... vehicles on highways equipped with multi-lane free flow (MLFF) systems. The ministry of road transport and highways (MoRTH) has initiated ...

India is betting big on electric buses. Infrastructure, finances could hit the brakes - ThePrint

... transport undertakings (SRTU). A report last year by the Ministry of Road Transport and Highways (MoRTH) estimated that SRTUs across states held a ...

Out of reach: Chennai's informal settlements lack safe and accessible bus shelters

According to data from the Ministry of Road Transport and Highways, Tamil Nadu accounted for the highest number of reported pedestrian fatalities in ...

Centre clears Rs 988.75 cr for road development | Thiruvananthapuram News

... road development projects in Kerala, public works minister P K Basheer said on Friday. The Union ministry of road transport and highways granted ...

Centre sanctions Rs 14630 crore for national highways projects in Andhra Pradesh

The projects include 34 works on the expansion of 609 km long highways and construction of bridges under MoRTH at a cost of Rs 6,421 crore and three ...

Govt plans to rate national highway corridors on safety, road quality - Business Standard

The Ministry of Road Transport and Highways is planning to rank national highway (NH) corridors based on their performance to identify ...

Gadkari proposes 20 percent leeway for speeding on expressways - Autocar India

Union road transport and highways minister Nitin Gadkari has asked officials to allow a 20 percent margin above the applicable speed limit before ...

MoRTH to Rate National Highways for Performance & Safety - Rediff Money

MoRTH introduces a new rating framework for National Highways to assess efficiency, safety, and user experience, prioritizing improvements across ...

Photo Album | PIB

Additional Secretary, Ministry of Road Transport and Highways (MoRTH), Shri Mahmood Ahmed addressing at the 'Transport Mela' under PARIVARTAN Scheme ...

NHAI Ensures Highway Safety and Swift Emergency Response Amid Cyclone Arnab in ...

Ministry of Road Transport & Highways. azadi ka amrit mahotsav. NHAI ... Ministry of Road Transport & Highways. NHAI Ensures Highway Safety and ...

NHAI Successfully Completes Anti-Encroachment Drive on NH-44 and NH-444A

Ministry of Road Transport & Highways. azadi ka amrit mahotsav. NHAI Successfully Completes Anti-Encroachment Drive on NH-44 and NH-444A. Posted On ...

Photo Album | PIB

Additional Secretary, Ministry of Road Transport and Highways (MoRTH), Shri Mahmood Ahmed attends the 'Transport Mela' under PARIVARTAN Scheme at the ...

FASTag New Rule 2026: MoRTH Introduces Annual Concessional Local Pass - Times Now

FASTag new rule from November 1, 2026: Check MoRTH's Rs 1500–Rs 3000 annual local pass, eligibility criteria and key restrictions for toll plaza ...

MoRTH introduces concessional local pass for National Highway users living near fee plazas

#FASTag local pass 2026#National Highway toll pass#FASTag annual pass for local residents#MoRTH toll pass rules#concessional toll pass from ...

🔔 Broadcast Push Notification to Active Devices

Send an instant FCM push notification to all 35 active devices or target an individual device. Notifications are automatically sent whenever new emails/articles are synced.

Registered Devices (38)

Devices registered in MySQL (notification_devices) with their active push notification status.

Device ID Platform Status FCM Token Updated Action
device-android-1795499647403-rardcrld Android Enabled ✓ e8UpoxlaTL28xNjA...iyQzET9Q 2026-11-24 11:33:41
device-android-1795499251208-6ev6ywla Android Enabled ✓ ehxycXncSxmSyTZk...TNO7QUfI 2026-11-24 11:22:00
device-android-1795496575252-zsqij5dk Android Enabled ✓ d7ilVWHPQFqdoOck...b7r-DJ80 2026-11-24 11:16:12
device-android-1795166860647-x2ihdb29 Android Enabled ✓ cAQfZllcTdaE919k...kT2JDZRY 2026-11-24 10:48:29
device-android-1795438964946-uzidknq9 Android Enabled ✓ f2hyJMBlSYuN05pd...2ZAI1WtA 2026-11-24 10:19:37
device-android-1795154951998-zi6n4o64 Android Enabled ✓ fCpWozp1TOCEZ2tb...GpJQzZiI 2026-11-24 08:45:41
device-android-1795459972660-fx3is4px Android Enabled ✓ dMqkNKSrRJOo1Q_-...2vhKWp64 2026-11-24 00:28:28
device-android-1795458593341-i05wqlko Android Enabled ✓ cyO7I421SOCQ19Cm...MVFRyLas 2026-11-24 00:00:49
device-ios-1795159210257-nptwvp4i iOS Enabled ✓ ciym7Q_flUUJpTGT...E80juFLo 2026-11-23 19:03:24
device-android-1795438964938-sf9p9qux Android Enabled ✓ f2hyJMBlSYuN05pd...2ZAI1WtA 2026-11-23 18:32:46
device-android-1795438195846-a2fnyncn Android Enabled ✓ enuFp5ddRQeDzVmc...wogvjJHc 2026-11-23 18:19:57
device-android-1795438195853-rokk0v6x Android Enabled ✓ enuFp5ddRQeDzVmc...wogvjJHc 2026-11-23 18:19:57
device-android-1795435074504-s1207dgp Android Enabled ✓ c8znyAWIQEStJeAJ...lb1A4tp0 2026-11-23 18:15:04
device-android-1795435737150-qjf2hm6s Android Enabled ✓ cM3tgrMgSg-Rclsk...cKWugv4g 2026-11-23 17:48:21
device-android-1795435074502-01g08by7 Android Enabled ✓ c8znyAWIQEStJeAJ...lb1A4tp0 2026-11-23 17:27:57
device-android-1795434835000-qs98fgrz Android Enabled ✓ cG9CIuTRTuGQA1uN...RJqurzlw 2026-11-23 17:23:56
device-android-1795420003879-3vhlug50 Android Enabled ✓ fiCfeS7qSCyRpyVJ...lY8jMaDs 2026-11-23 17:10:26
device-android-1795422701261-w8nco0yh Android Enabled ✓ fExLvX2lTSmhvQTB...uLp4rts0 2026-11-23 16:48:49
device-android-1794982807522-4ds6k3y7 Android Enabled ✓ dlaX15u9QaCpt8rt...Iq6R3B6Y 2026-11-23 10:47:36
device-android-1795159212789-f7rsjeeh Android Disabled ✗ caeKYVnuTTef4wcI...cwll45yQ 2026-11-20 17:44:36
device-android-1795073562641-rl8chv5y Android Disabled ✗ dl9h2SscT_aBwnAI...qcRWWyCw 2026-11-20 17:44:35
device-android-1795073315986-8v4dph2y Android Disabled ✗ f5Bcx6WVTFSasm8v...XMgD3c7I 2026-11-20 17:44:34
device-android-1794981119152-93rf3h9w Android Enabled ✓ eaf6SfDWSiiWm04z...VYCupyXQ 2026-11-20 17:35:01
device-android-1794978420049-cgvj1n1x Android Enabled ✓ eXvlyIofS0ynN2Su...Iqzs23XQ 2026-11-20 15:11:00
device-android-1795166860646-d2j1z4qf Android Enabled ✓ cAQfZllcTdaE919k...kT2JDZRY 2026-11-20 14:57:42
device-ios-1795157353691-jj99itwj iOS Enabled ✓ d5c5bLKE5kowsrt7...cpxBKAf4 2026-11-20 12:48:49
device-android-1795157824878-w8dy3iba Android Enabled ✓ f5v8M3XARtqILygy...5iVykeIE 2026-11-20 12:48:22
device-ios-1795151971619-jvv2j1im iOS Enabled ✓ caZnm4E1D0sPm057...dEuRhDe4 2026-11-20 12:07:26
device-android-1795154951999-gfk0qibp Android Enabled ✓ fCpWozp1TOCEZ2tb...GpJQzZiI 2026-11-20 11:39:12
device-android-1794985991971-n81kg3ji Android Enabled ✓ fnc5i9u-RIOikHmg...9EWia_VE 2026-11-19 17:40:30
device-android-1794983397140-qleieg99 Android Enabled ✓ d9tIqhKGRv26XMqS...HUXWG1lw 2026-11-19 16:01:52
device-android-1794993707712-ll5iehrx Android Enabled ✓ c1P--egaToydnjZX...a_wtq1kw 2026-11-18 14:51:50
device-android-1794993707711-4rd18f4r Android Enabled ✓ c1P--egaToydnjZX...a_wtq1kw 2026-11-18 14:51:50
device-android-1794985991967-rssipve0 Android Enabled ✓ fnc5i9u-RIOikHmg...9EWia_VE 2026-11-18 12:43:15
device-android-1794983397139-wf9bio8s Android Enabled ✓ d9tIqhKGRv26XMqS...HUXWG1lw 2026-11-18 11:59:59
device-android-1794982854928-hu71tww7 Android Enabled ✓ cgKmhRfYSO2Eqby9...m0pLdg4Y 2026-11-18 11:50:56
device-android-1794982854930-jya9dqh7 Android Enabled ✓ cgKmhRfYSO2Eqby9...m0pLdg4Y 2026-11-18 11:50:56
device-android-1794982807514-qiwdsle4 Android Enabled ✓ dlaX15u9QaCpt8rt...Iq6R3B6Y 2026-11-18 11:50:09

Test Live Gmail API Query & Regex Flattening

This queries your Gmail inbox in real-time, extracts MIME parts, runs the Google Alerts regex flattener, and returns the individual news articles.

Press "Fetch Live Messages" to see real-time parsed articles.

How the Silent Refresh Token Method Works

Unlike traditional web flows where a user must manually click login every hour, this PHP implementation utilizes Google's access_type=offline OAuth2 flow.

  1. Initial Authorization: The user authorizes once via /auth.php with prompt=consent.
  2. Refresh Token Acquired: Google returns a long-lived refresh_token, which is automatically saved to the MySQL database (app_settings table).
  3. Silent Token Renewal: When background jobs (e.g., scripts/sync_news.php) or API calls run, PHP checks if the cached access token is expired. If expired, it sends a direct cURL POST to https://oauth2.googleapis.com/token to obtain a fresh access token without user interaction.

Active Environment Configuration (.env)

Database Engine: MySQL / MariaDB (Active DB: drivingapi ✓)
Google Client ID: 310899356827-9toprk47vc9mffjbhfudumqo7be3bpfa.apps.googleusercontent.com
Redirect URI: https://drivinglearningappapi.gaurish.com/callback.php
Active Refresh Token: 1//0gqnw2aQ2uim...1xLWDMeGHkwp7Qc
Firebase Service Key: ✓ Loaded (config/serviceAccountKey.json)
Firebase Project ID: drivementor-e5e75
Allowed Senders Filter: [email protected]
PHP Engine Version: PHP 8.2.36 (Compatible with 7.4.30 and 8.0+)

Automating with Windows Task Scheduler or Cron

To run the synchronization periodically (e.g., every 1 hour) without needing a browser open, run scripts/sync_news.php via PHP CLI:

php scripts/sync_news.php

Or call it via an HTTP Webhook:

curl http://localhost:8000/api/emails/sync.php

Available REST API Endpoints

GET api/emails.php?page=1&limit=10 — Paginated & Searchable Emails JSON API (supports ?search=query)
GET api.php?action=status — System & authentication diagnostics
GET api.php?action=devices — List all registered devices & active status
POST api.php?action=send_notification — Broadcast or send push notification to devices
POST api/notifications/save-token.php — Register / update device FCM token
POST api/notifications/toggle-status.php — Enable or disable notifications for deviceId
GET api.php?action=messages&limit=5 — Live Gmail fetch & parsed items
GET/POST api/emails/sync.php — Trigger silent sync & save new articles