PageRenderTime 41ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/blog/core/packages/phpthumbof-1.4.0-pl/modSnippet/5173e725a3f35fce0e244cbbdc6a5b38/0/phpthumbof/model/aws/README.md

https://bitbucket.org/orchdork10159/dnsman.ly
Markdown | 120 lines | 87 code | 33 blank | 0 comment | 0 complexity | 572dc4ceb8980d1485b8fb942f96b279 MD5 | raw file
  1. # AWS SDK for PHP
  2. The AWS SDK for PHP enables developers to build solutions for Amazon Simple Storage Service (Amazon S3),
  3. Amazon Elastic Compute Cloud (Amazon EC2), Amazon SimpleDB, and more. With the AWS SDK for PHP, developers
  4. can get started in minutes with a single, downloadable package.
  5. The SDK features:
  6. * **AWS PHP Libraries:** Build PHP applications on top of APIs that take the complexity out of coding directly
  7. against a web service interface. The toolkit provides APIs that hide much of the lower-level implementation.
  8. * **Code Samples:** Practical examples for how to use the toolkit to build applications.
  9. * **Documentation:** Complete SDK reference documentation with samples demonstrating how to use the SDK.
  10. * **PEAR package:** The ability to install the AWS SDK for PHP as a PEAR package.
  11. * **SDK Compatibility Test:** Includes both an HTML-based and a CLI-based SDK Compatibility Test that you can
  12. run on your server to determine whether or not your PHP environment meets the minimum requirements.
  13. For more information about the AWS SDK for PHP, including a complete list of supported services, see
  14. [aws.amazon.com/sdkforphp](http://aws.amazon.com/sdkforphp).
  15. ## Signing up for Amazon Web Services
  16. Before you can begin, you must sign up for each service you want to use.
  17. To sign up for a service:
  18. * Go to the home page for the service. You can find a list of services on
  19. [aws.amazon.com/products](http://aws.amazon.com/products).
  20. * Click the Sign Up button on the top right corner of the page. If you don't already have an AWS account, you
  21. are prompted to create one as part of the sign up process.
  22. * Follow the on-screen instructions.
  23. * AWS sends you a confirmation e-mail after the sign-up process is complete. At any time, you can view your
  24. current account activity and manage your account by going to [aws.amazon.com](http://aws.amazon.com) and
  25. clicking "Your Account".
  26. ## Source
  27. The source tree for includes the following files and directories:
  28. * `_compatibility_test` -- Includes both an HTML-based and a CLI-based SDK Compatibility Test that you can
  29. run on your server to determine whether or not your PHP environment meets the minimum requirements.
  30. * `lib` -- Contains any third-party libraries that the SDK depends on. The licenses for these projects will
  31. always be Apache 2.0-compatible.
  32. * `services` -- Contains the service-specific classes that communicate with AWS. These classes are always
  33. prefixed with `Amazon`.
  34. * `utilities` -- Contains any utility-type methods that the SDK uses. Includes extensions to built-in PHP
  35. classes, as well as new functionality that is entirely custom. These classes are always prefixed with `CF`.
  36. * `CHANGELOG`, `CONTRIBUTORS`, `LICENSE`, `NOTICE`, `README` -- File names that are all-caps are informational
  37. documents; the contents of which should be fairly self-explanatory.
  38. * `config-sample.inc.php` -- A sample configuration file that should be filled out and renamed to `config.inc.php`.
  39. * `sdk.class.php` -- The SDK loader that you would include in your projects. Contains the base functionality
  40. that the rest of the SDK depends on.
  41. ## Minimum Requirements in a nutshell
  42. * You are at least an intermediate-level PHP developer and have a basic understanding of object-oriented PHP.
  43. * You have a valid AWS account, and you've already signed up for the services you want to use.
  44. * PHP 5.2 or newer (5.2.14 or latest 5.3.x highly recommended)
  45. * [SimpleXML](http://php.net/simplexml) extension
  46. * [JSON](http://php.net/json) (JavaScript Object Notation) extension
  47. * [PCRE](http://php.net/pcre) (Perl-Compatible Regular Expressions) extension
  48. * [SPL](http://php.net/spl) (Standard PHP Library) extension
  49. * [cURL](http://php.net/curl) extension (compiled with [OpenSSL](http://openssl.org) for HTTPS support)
  50. * Ability to write to the file system
  51. We've included an [SDK Compatibility Test](http://github.com/amazonwebservices/aws-sdk-for-php/tree/master/_compatibility_test/)
  52. that you can run to determine whether or not your PHP environment meets the minimum requirements.
  53. ## Installation
  54. ### Via GitHub
  55. Amazon Web Services publishes releases of the AWS SDK for PHP to [GitHub](http://github.com/amazonwebservices),
  56. which is a hosted service for [Git](http://git-scm.com) repositories.
  57. If you're unfamiliar with Git, there are a variety of resources on the net that will help you learn more:
  58. * [Everyday Git](http://www.kernel.org/pub/software/scm/git/docs/everyday.html) will teach you just enough
  59. about Git to get by.
  60. * The [PeepCode screencast](https://peepcode.com/products/git) on Git ($9) is easier to follow.
  61. * [GitHub](http://github.com/guides/home) offers links to a variety of Git resources.
  62. * [Pro Git](http://progit.org/book/) is an entire book about Git with a Creative Commons license.
  63. * [Git for the lazy](http://www.spheredev.org/wiki/Git_for_the_lazy) is a great mini-reference to remind you
  64. how to do things.
  65. * If you want to dig even further, I've bookmarked [other Git references](http://delicious.com/skyzyx/git).
  66. Here's how you would check out the source code from GitHub:
  67. git clone git://github.com/amazonwebservices/aws-sdk-for-php.git AWSSDKforPHP
  68. cd ./AWSSDKforPHP
  69. ### Via PEAR
  70. Amazon Web Services also publishes releases of the AWS SDK for PHP to a self-hosted
  71. [PEAR repository](http://pear.amazonwebservices.com).
  72. If you're unfamiliar with how to install PEAR packages, check out
  73. [Command line installer](http://pear.php.net/manual/en/guide.users.commandline.cli.php) in the PEAR user guide.
  74. sudo pear channel-discover pear.amazonwebservices.com
  75. sudo pear install aws/sdk
  76. ### Configuration
  77. 1. Copy the contents of [config-sample.inc.php](https://github.com/amazonwebservices/aws-sdk-for-php/raw/master/config-sample.inc.php)
  78. and add your credentials as instructed in the file.
  79. 2. Move your file to `~/.aws/sdk/config.inc.php`.
  80. 3. Make sure that `getenv('HOME')` points to your user directory. If not you'll need to set
  81. `putenv('HOME=<your-user-directory>')`.
  82. ## Additional Information
  83. * AWS SDK for PHP: <http://aws.amazon.com/sdkforphp>
  84. * PHP Developer Center: <http://aws.amazon.com/php>
  85. * Documentation: <http://docs.amazonwebservices.com/AWSSDKforPHP/latest/>
  86. * License: <http://aws.amazon.com/apache2.0/>
  87. * Discuss: <http://aws.amazon.com/forums>