Jump to content

Need help creating a PHP gmail reader


Micah C

Recommended Posts

I have recently discovered that Gmail offers a way to read your emails with rss. (https://USER:PASS@mail.google.com/mail/feed/atom/index.xml) Im currently trying to find a way to read this feed and display it on a web page with PHP. I have tried various different "solutions", but have had no success. Does anyone know how I could accomplish this task?

Things I have tried so far:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Loading directly an RSS feed and displaying it</title></head>


<body bgcolor="#FFFFFF">
<h1>RSS 2.0 Demo Direct</h1>
<hr>
<div id="zone" > Loads directly an RSS file and displays the list of recent articles. 
</div>

<br>
<p>
<?php
	require_once("rsslib.php");
	$url = "https://USER:PASS@mail.google.com/mail/feed/atom/index.xml";
	echo RSS_Display($url, 15);
?>

</p>
</body>
</html>

Tried using this resource: http://www.scriptol.com/rss/atom-reader.php

Maybe I'm doing something wrong. If anyone can help it would be GREATLY appreciated, thanks.

Link to comment
Share on other sites

Just use somethign like cURL to pull it down to the browser, or just navigate to that url. Atom feeds are generally web ready to begin with and should open like a web page, unlike most RSS, which will either spit out an xml file or just ask you to subscribe.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...