Weird Problem with curl while sending data


Posted on 16th Feb 2014 07:03 pm by admin

I am facing a weird problem with sending data to a site via curl.

If i send the value by this

Code: $data1="action=capt&tm=1256956853&tmhash=074144d43b5e2fcf34607221bd51b69dded08475&wait=30&waithash=7772647b09ec9995fc3c92d9f04be89029f80564";
curl_setopt($ch2, CURLOPT_POSTFIELDS,$data1);
It works in the above case but however if I send the values like this

Code: $data="action=".$action."&tm=".$tm."&tmhash=".$tmhash."&wait=".$wait."&waithash=".$waithash;
curl_setopt($ch2, CURLOPT_POSTFIELDS,$data);
It won't work.
Here I set $data1 from the value of $data only by getting its output on screen. So $data1 and $data are same.
Just the difference is that $data is in form of variables which I get using preg_match.
I use preg_match to get values of action,tm,tmhash and all that.

No comments posted yet

Your Answer:

Login to answer
131 Like 22 Dislike
Previous forums Next forums
Other forums

Slow data retrieval which requires improvement..please help
I am working on a Help Desk Ticketing system and have a page called MY TICKETS which shows all ticke

Why Are These Functions Causing MASSIVE Memory Problems? Please Help!
Hi,

I have a script with some options.

I use regex to replace patterns in strings, but

Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment

weird problem
last time, i did post a topic concerning why my page sometime will load as blank page when using IE.

please, need help coding this voting for your favorite car polling system.
hi, my code needs a lot of work, but i want to be able to let users vote on their favorite car, upda

Batch Session SM35 stuck in status 'in Background
Hi Experts,

I am facing a problem with Batch Input session SM35.

The batch se

Code error with Index.php
Error: Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/runevid/public_

Checking if a process is running (problems including psapi.dll i think...)
Ok, so all I'm trying to do is check if a program is running...

I've found out that I nee

Calling variables
I want to call this to my website but it doesn't display what I want it to,

Code: <h5&

Calling All PHPFREAKS Blackberry Users
Are you a member of PHPFreaks and have a blackberry? Well RIM just recently released Blackberry Mes

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash