curl-and-php
CURLOPT_POSTFIELDS problems
Date: Mon, 18 Apr 2005 15:53:17 -0700 (PDT)
I want to make a script that will help me a lot. I
made it, but it doesnt work, i can understand why. I
hope this is the way to find out.
Here are some things about my script:
$data1="username=".urlencode($user);
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch,
CURLOPT_URL,"http://www.darkthrone.com/alliances.dt?session=&alliance=72582&action=invite&username=");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR,
"/tmp/cookie$aut.txt");
curl_setopt($ch, CURLOPT_COOKIEFILE,
"/tmp/cookie$aut.txt");
$page = curl_exec ($ch);
curl_close ($ch);
What excacly should do. Well, send an invitation to
$user. And the form from the link looks like:
<form method="post"
action="alliances.dt?session=&alliance=72582&action=invite&action2=send">
<input src="alliances.dt_files/submit.gif"
class="submitImg" type="image">
No other imput.
What the problem can be? I will give any other support
for anyone that will whant to help me with this script.
__________________________________
Do you Yahoo!?
Plan great trips with Yahoo! Travel: Now over 17,000 guides!
http://travel.yahoo.com/p-travelguide
Received on 2005-04-19