Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

AWS Developer Blog:
Using the Multipart Uploader with Client-Side Encryption for Amazon S3 in the AW
Dec 26, 2017 @ 16:22:18

On the AWS PHP SDK blog there's a new tutorial posted showing you how to use the multipart uploader with client-side encryption via the library.

The AWS SDK for PHP released support for multipart uploads with client-side encryption in version 3.48.0 via the S3EncryptionMultipartUploader. With client-side encryption, data is encrypted and decrypted directly in your environment. This means that this data is encrypted before it’s transferred to Amazon S3, and you don’t rely on an external service to handle encryption for you.

Multipart uploads are designed to improve the upload experience for larger objects. With it, you can upload objects via parts that can be uploaded independently, in any order, and in parallel. You can use a multipart upload for objects from 5 MB to 5 TB in size.

The article then starts you off with the requirements you'll need to follow along and some sample code to get the client up and running. The code then shows how to perform the file upload, making use of a file stream (via fopen) to pull in the contents of the file. The tutorial finishes by describing some of the other fields that can be used with the client and links to other SDKs that support this same functionality in other languages.

tagged: multipart uploader clientside encryption tutorial sdk aws

Link: https://aws.amazon.com/blogs/developer/using-the-multipart-uploader-with-client-side-encryption-for-amazon-s3-in-the-aws-sdk-for-php/

Rob Allen:
Sending attachments in multipart emails with ZendMail
Sep 16, 2014 @ 14:18:09

Rob Allen has a new post today showing you how to use the ZendMail component of the Zend Framework 2 to send attachments with multipart emails. A multipart email allows you to combine both the HTML and plain text versions of the content into a single email.

I've written before about how to send an HTML email with a text alternative in ZendMail, but recently needed to send an attachment with my multipart email. With help from various sources on the Internet, this is how to do it.

He includes the full code for the example first: a "sendEmail" function that sets up the MIME and plain-text parts and uses the "MimeMessage" and "MimePart" objects to attach the file. He goes through each of the parts of the script and describes what's happening and how that changes the content of the email. You can find out more about the ZendMail component in this section on the Zend Framework manual.

tagged: tutorial send email attachment multipart zendframework2 zendmail

Link: http://akrabat.com/zend-framework-2/sending-attachments-in-multipart-emails-with-zendmail/

PHPMaster.com:
Sending Emails with PHP
Oct 25, 2011 @ 01:08:52

In a new tutorial from PHPMaster.com Jason Pasnikowski takes a look at sending emails with PHP - an introduction to what the language offers and how it can be used to send an HTML version.

In most cases your installation of PHP will be capable of sending emails. If you are using a shared host, or if you installed PHP using a package management system like apt-get, more than likely you’re all set. You’ll really only need to worry about extra configuration if you’re compiling PHP from source or if you’re running it on Windows. In either case, there are plenty of resources available online to help you out. Because that’s all beyond the scope of this article, I’ll assume you’re set. If not, Google will be your friend.

He starts with a simple example using the mail function but quickly moves on to sending a multi-part email with an attached zip file and HTML content. He includes the all code you'll need and explains each part in detail so you'll know exactly what's going on.

tagged: send email tutorial html multipart zip file

Link:

Ian Christian's Blog:
Sending multipart email from a Task in symfony 1.4
Dec 16, 2009 @ 13:58:37

In a recent post to his blog Ian Christian has written up an example of how to send a multipart email from a Task inside your Symfony application.

I recently needed to send the result of an action in symfony via email daily. E-mail has changed slightly in symfony 1.3/1.4 - here's how I did it. I really don't like my solution at all, the use of get_partial() from within a Task seems very wrong to me - but I'm in a rush so it will do for now, I'd love to hear feedback.

His class extends the sfBaseTask and sets up an execute method that builds a database connection, fetches a few rows and, with a newly created mailer instance, sends the information using the get_partial method to define both HTML and text content parts of the email.

tagged: multipart email task symfony tutorial

Link:

Terry Chay's Blog:
Clever HTTP
Feb 15, 2007 @ 14:19:00

With the recent release of a new Firefox/PHP combination extension, several developers were interested in just how it all worked. One such developer is Terry Chay who has posted about it to his blog today after looking into how it all fits together.

The standard way of debugging in PHP involves just echoing shit to the screen. The fact that PHP is a scripting language makes this an excellent way of debugging on the web. But what happens when doing this breaks your site?

That's where FirePHP comes in - it sends along a special request from your PHP script (as fired off by special code you insert) to include debugging information inside a different part of a "multipart/mixed" message. Terry also includes some of his sample code (including a custom version of the software) that he used to get things working. Check out the screenshot for the results.

tagged: http firephp firefox extension example screenshot multipart message http firephp firefox extension example screenshot multipart message

Link:

Terry Chay's Blog:
Clever HTTP
Feb 15, 2007 @ 14:19:00

With the recent release of a new Firefox/PHP combination extension, several developers were interested in just how it all worked. One such developer is Terry Chay who has posted about it to his blog today after looking into how it all fits together.

The standard way of debugging in PHP involves just echoing shit to the screen. The fact that PHP is a scripting language makes this an excellent way of debugging on the web. But what happens when doing this breaks your site?

That's where FirePHP comes in - it sends along a special request from your PHP script (as fired off by special code you insert) to include debugging information inside a different part of a "multipart/mixed" message. Terry also includes some of his sample code (including a custom version of the software) that he used to get things working. Check out the screenshot for the results.

tagged: http firephp firefox extension example screenshot multipart message http firephp firefox extension example screenshot multipart message

Link:


Trending Topics: