467,179 Members | 1,167 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,179 developers. It's quick & easy.

Help with curl.

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
  • viewed: 1246
Share:
3 Replies
KevinADC
Expert 2GB
look up how to use the LWP module. Thats all the help I will provide.
Jul 12 '08 #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 2GB
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.

Similar topics

3 posts views Thread by Chris Fortune | last post: by
reply views Thread by info | last post: by
reply views Thread by nfhm2k@gmail.com | last post: by
3 posts views Thread by Chuck Renner | last post: by
1 post views Thread by devranger | last post: by
9 posts views Thread by devranger | last post: by
4 posts views Thread by zorro | last post: by
reply views Thread by xerc | last post: by
1 post views Thread by c1pkw | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.