Forum Moderators: coopster
What I would like to do is to create a php script that when initiated will open this .txt file, grab the attachment, unzip the attachment, read the contents, and add it into a database.
I know how to have script read a file, and then grab the text that I'm interested in, however, once I have this text, how would I go about unzipping it to read the resulting data.
By hand I've tried just taking the attached data, and pasting it into notepad and trying to save it as a .zip file, and then have tried to open it, but I get errors even when I try to do that. "The zipped file is invalid or corrupt".
Any help would be greatly appreciated. Thanks.
some of these are disabled on shared hosts
Before I get to far into this, should I be concerned that when I try to grab the attachment code and save it as a zip file, that I can't open it?
Do files when they get attached to an email get encoded somehow, and do I need to decode this attachment before I can start unzipping it?
The email says above the attachment "Content-Transfer-Encoding: base64"
Thanks.