473,321 Members | 1,667 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

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
3 1629
KevinADC
4,059 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
3,509 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

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

Similar topics

3
by: Chris Fortune | last post by:
# uname -a Linux stargate.mxc-online.net 2.4.20-021stab022.2.777-smp #1 SMP Wed Jul 28 17:12:37 MSD 2004 i686 i686 i386 GNU/Linux I recompiled PHP with mcrypt, openssl, and curl phpinfo():...
2
by: jimb | last post by:
I need some advice on how to securely transfer data between two servers. Here is the situation. We have two sql servers that hold student data. I have full access to my sql server, but only write...
0
by: info | last post by:
Dear all, is the first time that I use SOAP, and i must say that i'm having several problems. this is SOAP message that expects the server =================XML EXPECTED FROM THE...
0
by: nfhm2k | last post by:
I've been trying to find a solution to this for quite some time now... I even took a look at existing scripts... Including this one......
3
by: Chuck Renner | last post by:
Please help! This MIGHT even be a bug in PHP! I'll provide version numbers and site specific information (browser, OS, and kernel versions) if others cannot reproduce this problem. I'm...
1
by: devranger | last post by:
Hello, I am in the process of learning PHP CURL and in doing some test examples I am having some issues with CURL that I do not fully understand. I am doing a test to use CURL to post and return...
9
by: devranger | last post by:
I am using the below CURL Function and can not figure out why it is not retruning the results from the post. Can anyone take a look and tell me what I may be doing wrong? I am just not seeing...
4
by: zorro | last post by:
Hello there, I can't figure out why is it that when i use an array for my postfields it doesn't work : this works curl_setopt($curl, CURLOPT_POSTFIELDS, "clown=bozo" ); this doesn't...
0
by: xerc | last post by:
I am trying to create a generic function I can call to download all files from a single remote FTP directory -- using CURL. I want to multi-thread it, but need to get the single thread functionality...
1
by: c1pkw | last post by:
Hi there, I’m having a real heap of trouble with PHP and cURL My aim is to use this code (or something like it) to submit 2 fields to a remote server (using GET) and receive back 6 fields...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.