By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,811 Members | 1,978 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,811 IT Pros & Developers. It's quick & easy.

Help with curl.

P: 2
I m new to perl only know basics. but can any one help me with this CURL?

I have this php curl.. want to change it to perl..

PHP Code:
Expand|Select|Wrap|Line Numbers
  1. function curl($a,$b,$c,$d,$e){
  2.    $ch = curl_init();
  3.       curl_setopt_array($ch,
  4.          array(
  5.             CURLOPT_URL => $a,
  6.             CURLOPT_RETURNTRANSFER => $b,
  7.             CURLOPT_COOKIE => $c,
  8.             CURLOPT_HEADER => $d,
  9.             CURLOPT_NOBODY => $d,
  10.             CURLOPT_CUSTOMREQUEST => ($e)?"POST":"GET",
  11.             CURLOPT_POSTFIELDS => $e
  12.          )
  13.       );
  14.    $g = curl_exec($ch);
  15.    curl_close($ch);
  16.    return $g;
  17. }
Any little help will also b appretiated!
Jul 12 '08 #1
Share this Question
Share on Google+
3 Replies


KevinADC
Expert 2.5K+
P: 4,059
look up how to use the LWP module. Thats all the help I will provide.
Jul 12 '08 #2

P: 2
look up how to use the LWP module. Thats all the help I will provide.
Hey man thanx for the help. i tried LWP::Simple but did still not working i think i m translating sumthing wrong plz translate me a little and rest i will get some idea. Thanx again for replying.
Jul 13 '08 #3

numberwhun
Expert Mod 2.5K+
P: 3,503
Hey man thanx for the help. i tried LWP::Simple but did still not working i think i m translating sumthing wrong plz translate me a little and rest i will get some idea. Thanx again for replying.
s/sum/some/ -> Sorry, it was bugging me to see the mis-spelling.

As for your issue, why don't you post your code (inside of code tags please) and we can take a look at it.

Regards,

Jeff
Jul 13 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.