Welcome Guest, Not a member yet? Register   Sign In
CI Proxy Library - Browser simulator (REST, Cookies and Proxy Support, PURE PHP) [NEW] HTTP Authorization
#1

[eluser]toopay[/eluser]
Hi all.

It's been a while, since i use CI in my (commercial) project. What i like from it, beside other framework (i use several framework, i have 2 favorite : Kohana and CI Smile ), its had enough helper and library to make developer life easier.

When i develop some project, i need to have a simple way to call another controller, or even an external resource (ex. api from google, or iptocountry@sourceforge). I create a simple cURL class to do that. This is the (almost) stable version of that, this enough for my needs. I’ll take it to higher level, as soon as i had a long holiday from my work.

It have several features, which might help you during development (or even in live web) process.

Here's the way you use it
Code:
// Simple way to use this library
// In any controller, put this line...
...
$this->load->library('proxy');
$this->proxy->site('http://codeigniter.com',TRUE);
...

// Above example will give you rendered page of CodeIgniter site, if you didn't want
// to render it directly, or it was a json which you want to save to var, simply do this...
...
$this->load->library('proxy');
$json_var = $this->proxy->site('http://ip2country.sourceforge.net/ip2c.php?ip='.$ip.'&format=JSON');
...

// To call your controller (maybe in some situation, you need it instead use redirect() function)
...
$this->load->library('proxy');
$this->proxy->controller('your_target_controller_name/target_function/some_id',TRUE);
...

Grab it! And i'll be here, if you had some feedback, bug report or some trouble with it.

Cheers!
Toopay


Messages In This Thread
CI Proxy Library - Browser simulator (REST, Cookies and Proxy Support, PURE PHP) [NEW] HTTP Authorization - by El Forum - 04-12-2011, 04:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB