Curl/Curb


#1

Hi,

I have some PHP that I need to emulate in Rails.

The PHP is:

curl_setopt($ch, CURLOPT_URL,“http://127.0.0.1/handler.php”);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "USERNAME=name&PASSWORD=pass );

I’ve installed curllib and the curb rubygem, but being new to Rails I
have no idea how to ‘use’ curb within the rails app (require ‘curb’
failed). Do I need to create a curb lib and drop it into the lib folder?

Some help would be greatly appreciated!


#2

Ross wrote:

Hi,

I have some PHP that I need to emulate in Rails.

The PHP is:

curl_setopt($ch, CURLOPT_URL,“http://127.0.0.1/handler.php”);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "USERNAME=name&PASSWORD=pass );

I’ve installed curllib and the curb rubygem, but being new to Rails I
have no idea how to ‘use’ curb within the rails app (require ‘curb’
failed). Do I need to create a curb lib and drop it into the lib folder?

Some help would be greatly appreciated!

Nevermind - accomplished it with net/http.