Created
December 26, 2012 16:23
-
-
Save filhodanuvem/4381227 to your computer and use it in GitHub Desktop.
And if cURL was more easy on PHP ?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//maybe, do a source that works like a client with cURL could be hard and boring. | |
// A fluent interface would awesome. | |
// Anyway, the library can be used only to fun and study to learn how HTTP works in lower lever. | |
use Saturno\CoolUrl\Client as cu; | |
cu::create()->target("http://example.com/join") | |
->setMethod('POST') | |
->setParams(array( | |
'login' => 'foo', | |
'password' => 'barbaz', | |
) | |
) | |
->execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment