PHP IMAP: Looping through messages to find a specific subject

This post is part of a series about downloading email using the PHP IMAP functions. The ultimate goal of the series is to show how to export Google Analytics data by email, and then use PHP to connect to the mail server, find and download the appropriate message and then load the data into a database. This post looks at how to look for a specific email message using the PHP IMAP functions.

Categories PHP

Using PHP IMAP functions to download email

This post looks at how to connect to a POP or IMAP mailbox using PHP’s IMAP mail functions and retrive the number of messages in the mailbox, the message headers and body, and then to delete the message.

Categories PHP

Extracting attachments from an email message using PHP IMAP functions

This post is part of an ongoing series which aims to show how to extract data from Google Analytics using its scheduled email reports system. I have already looked at how to send Google Analytics data by email, and how to use the PHP IMAP functions to download email. I will also look at using other PHP libraries to download email and attachments, but for now this post looks at how to extract email attachmentsusing the PHP IMAP functions.

Categories PHP

Add additional HTML code after the first </p> tag in PHP

I recently made some minor layout changes to my blog including the positioning of the advertising from the top of each article to after the first paragraph. In this post I share the PHP code used to add some additional HTML code after the first closing </p> tag in a page’s content.

Categories PHP