question on php imap_open, base64_decode and csv file attachments
-
Hello, I have a small project to make a script to check an email account, for an email from a specific source and then check that email for a file attachment. This file is a csv file. Using php's imap functions I cna login in find the correct email. When I go to parse the attachment (if one is found) I can print_r the contents and get readable content using the base64_decode. I have also noticed these 3 characters at the front of the file

If i was to take a guess, these are the from the header section of the file. the rest of the file displays properly with the first line containg the column headers in quotes and seperate by commas. The following lines are fine. I have based my scripts function based on this article. http://www.electrictoolbox.com/extract-attachments-email-php-imap/[^] and can not find mention of these characters... and ideas?
-
Hello, I have a small project to make a script to check an email account, for an email from a specific source and then check that email for a file attachment. This file is a csv file. Using php's imap functions I cna login in find the correct email. When I go to parse the attachment (if one is found) I can print_r the contents and get readable content using the base64_decode. I have also noticed these 3 characters at the front of the file

If i was to take a guess, these are the from the header section of the file. the rest of the file displays properly with the first line containg the column headers in quotes and seperate by commas. The following lines are fine. I have based my scripts function based on this article. http://www.electrictoolbox.com/extract-attachments-email-php-imap/[^] and can not find mention of these characters... and ideas?
Those three characters are a byte order mark[^]
-
Those three characters are a byte order mark[^]