实用的PHP开发类和库

jopen 10年前

PHP库提供了一个标准库接口,它允许开发人员充分利用PHP实现面向对象编程。这个库的接口创建一个标准的API,对于某些类型的内置功能,允许你的类以一个更加无缝的方式与PHP引擎集成。它提供的功能包括(例如)是能够定义你的对象将如何反应,遍历,高级的数组访问,文件和目录的访问,以及先进的SimpleXML对象处理。

 

1. Requests

实用的PHP开发类和库
Requests is a stable PHP library that uses cURL or fsockopen (depending on the availability) and provides a consistent API. It simplifies sending requests, accepts HEAD, GET, POST, PUT, DELETE or PATCH and adding headers, form data + multipart files. The library also works with international domain names, authentication, auto-decompressing gzipped responses and much more. To sum up, Requests is a must-bookmark for easy-to-use and hosting-friendly HTTP requests.
 
Source  

2. Munee

实用的PHP开发类和库
Munee is an all-in-one library that handles many things related to optimization and manipulation of website assets. The library has a powerful caching feature that can cache resources in both server and client-side. It integrates well with the PHP image manipulation library: Imagine for resizing or cropping images (and caching them afterwards). Munee can automatically compile LESS, SCSS and CoffeeScript. And, it cancombine CSS + JS files into a single request. Also, these CSS-JS files can be minified for a better performance. This PHP library integrates to any code easily with less effort and it can be used with or without .htaccess (good for Windows users).
 
Source  

3. Ratchet

实用的PHP开发类和库
Ratchet is a PHP library to let developers create real-time, bi-directional apps between clients and servers over WebSockets. It makes building event-driven apps (rather than traditional HTTP request/response apps) quick and easy.
 
Source  

4. SwiftMailer

实用的PHP开发类和库
Swift Mailer is a feature-rich PHP mailer library for sending e-mails from PHP websites and applications. It does not rely on PHP’s native mail() class which consumes high resources. Instead, Swift communicates directly with an SMTP server or a MTA binary to send mail quickly and efficiently. Swift supports event-driven plugins which offer you the opportunity to really take control of the library and set this mailer apart from everything else that’s out there.
 
Source  

5. Unirest

实用的PHP开发类和库
Unirest is a pack of lightweight HTTP libraries for many languages (PHP, Ruby, Python, Java And Objective-C). It has support for GET, POST, PUT, UPDATE, DELETE operations and its methods + response structure are the same in all languages. The usage is very simple and straightforward. Also, it is documented well.
 
Source  

6. Detector

实用的PHP开发类和库
Detector is an open source PHP library for detecting many things about the browsing environment of a user. It can get the browser used and browser’s HTML5-CSS3 capabilities, analyze whether it is mobile, tablet, desktop or a spider and other stuff like color depth, viewport dimensions, cookie support, etc. The library can automatically adapt itself to new browsers, versions and devices using the unique user-agent string of each browser. Simply, no need to update a browsers database.
 
Source  

7. PHP Thumb

实用的PHP开发类和库
phpThumb is a PHP library that handles all the hard work on creating thumbnails with only few lines of code. It accepts any source types for images (from the filesystem, URL or database) and all popular image formats. Images can be rotated, cropped, watermarked, their quality can be defined and there is even a built-in caching to minimize the server load. phpThumb also has a wide collection of filters including contrast, blur, brightness, applying rounded corners and more.
 
Source  

8. Zebra Image

实用的PHP开发类和库
Zebra_Image is an open source and lightweight image manipulation library built with PHP. The library is object-oriented, requires only the PHP GD2 extension and supports resize, crop, rotate and flip operations.
It works with .JPG, .GIF + .PNG formats and can convert one format to another after each action (transparency is preserved as well).
 
Source  

9. Hybrid Auth

实用的PHP开发类和库
HybridAuth is an open source PHP library for authenticating through multiple social services and ID providers. The services supported include OpenID,非死book, LinkedIn, Google,推ter, Windows Live, Foursquare, Vimeo, Yahoo, PayPal and more. It can be integrated easily into existing websites by inserting a file and few lines to the sign-in/up pages.
 
Source  

10. Gantt Charts

实用的PHP开发类和库
Gantti is an open source PHP class for generating Gantt charts on-the-fly. The charts created are pure HTML5-CSS3 with no JavaScript involved. The output looks very nice by default but can be customized with ease (with SASS stylesheet). It simply works by defining an array of start/end dates and calling a single function. Also, charts are cross browser (IE7+).
 
Source  

11. Mobile_Detect

实用的PHP开发类和库
Mobile_Detect is an open source PHP class for detecting mobile devices. It uses the User-Agent string combined with various HTTP headers in order to detect the mobile environment. The class can easily understand whether the platform is mobile, tablet or desktop. Also, functions exist for detecting whether it is iPad, iPhone, Android, Blackberry, etc. And, we can even drill-down to the versions of the platforms and browsers if needed. It has a huge library of devices (including Nook, Nexus, Kindle, Archos..) and browsers for a stable detection.
 
Source  

12. Imageworkshop

实用的PHP开发类和库
ImageWorkshop is an open source and free PHP class for managing and manipulating images. The class has an “image-editing-software-like logic” based on layers which enables superposing many layers or even layer groups (with the option of each layer being manipulated differently). It has support for many functions like placing an image (or many images) on another one (good for watermarks), cropping, moving, resizing, rotating (with any degrees), superposing, writing and more. ImageWorkshop works with the GD library, and also, allows us to apply filters provided with the library.
 
Source  

13. JqmPhp

实用的PHP开发类和库
jqmPhp is an open source project that aims to simplify using jQuery Mobile with PHP. It is a pack of PHP classes that can generate the HTML outputs which jQuery Mobile is expecting within few lines. The classes are on separate files (with names parallel to the JQM’s features) so you can choose to only use the necessary ones. It covers almost all the features of the framework, it is very well-documented and supported with examples.
 
Source  

14. PHP Image Cache

实用的PHP开发类和库
Image Cache is a lightweight PHP class that compresses, moves, and caches the image in the user’s browser. After that, it returns the new source of the image to be printed in an image tag which results in a serious gain on load time. The class works by simply setting options like the directory, the base URL, etc. and calling a compress function for each image.
 
Source  

15. Imagine

实用的PHP开发类和库
Imagine is an object-oriented PHP library for working with images and manipulating them. The library can handle frequently-used operations like resize, crop or applying filters. A color class helps generating the RGB values of any given color and methods exist for drawing shapes like arc, ellipse, line, pieSlice and more.
 
Source