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

Did you know?Explore Trending and Topic pages for more stories like 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

Install page
How do I make it so when a user submits information on the Install page, it'll right it into the cor

Wrong Info sent Using $get in form
Hi i have this code that i tried to make to send some info from one page to aother with lots of ppls

Logic question
im wondering what's the best method to do the above list:

it is for alliance @ MMORPG game

retrieving images from mysql database using php
So I've been trying to figure out how to store images in a mysql database, and as far as i can tell

Problem with php's rename function
So, i'm having a problem with the php rename function. Basically my script 'delete_user.php' attempt

Passing JS to PHP
So I have the following
Code: <?php
getdetails(?><script type="text/

Help: problem with Headers to download PDF file
Hi,

I'm trying to implement a script where when a user clicks a link he gets a PDF file to op

Word filter problem
Hello,

im trying to make a filter for words inputted in to my website but i want to store the

Session login issue
I'm wondering how to fix a problem I'm having with a session-based login system

Say I go to h

insert mysql embeded videos as blobs?
Using TinyMCE my client will be able to embed images and flash videos into large columns of text whi

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