piffall / phramework
There is no license information available for the latest version (v1.0.1) of this package.
Some PHP classes
v1.0.1
2015-05-17 11:23 UTC
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2026-04-26 02:33:24 UTC
README
phramework is a collection of PHP classes that I use frequently.
Installation
Go to yout project directory and install the package.
# Install composer if is not installed curl -sS https://getcomposer.org/installer | php # Install phramework using composer php composer.phar require piffall/phramework
Now, require Composer's autoloader in your aplication.
require 'vendor/autoload.php';
Curl
Curl is a curl wrapper. Here is an example.
use PHK\Curl as Curl; // New instance $c = new Curl(); // GET $c->setUrl('http://yourdomain.net'); $c->get(); // POST $c->setUrl('http://yourdomain.net/action/'); $c->setDataFields(array('username'=>'user', 'password'=>'*****')); $c->post(); // Result $html = $c->getLastReturn(); // Reset Object $c->reset(); // POST Multipart $c->setUrl('http://yourdomain.net/action/'); $c->setDataFields(array('username'=>'user', 'password'=>'*****'), true); // Errors $err_no = $c->getErrorNumber(); $err_str = $c->getErrorString();