cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Problem posting

From: <contact_at_lespagesjeux.com>
Date: Tue, 18 Nov 2003 09:21:52 +0100

Hello,
 
Firstable I'm very sorry for my bad english.
I very new to LibCurl and would like to post data other a French website
to connect and get periodically data information on it.
Before sending this email to the group I try this code on my local
network and it was pretty good but other the web nothing works!
 
The website is www.mcm.net <http://www.mcm.net/> (A music site)
The page whixh contain the form is http://www.mcm.net/membres/login.php
The code is :
 
<?php
 
$agent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)";
$ref = "http://www.mcm.net/membres/login.php";
 
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookie.txt");
curl_setopt($ch, CURLOPT_URL,"http://www.mcm.net/membres/login.php");
curl_setopt($ch, CURLOPT_USERAGENT, $agent); // I TRY WITH AND WITHOUT
AGENT
curl_setopt($ch, CURLOPT_REFERER, $ref); // I TRY WITH AND WITHOUT
REFERER
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
"user%5Blogin%5D=<MYLOGIN>&user%5Bpassword%5D=<MYPASSWORD>&action=valide
r&value.x=18&value.y=7");
curl_exec ($ch); // execute the curl command
echo $ch;
curl_close ($ch);
?>
 
Thank you for any help!
 
Wilfrid

-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
Received on 2003-11-18