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

curl-and-php

Cookies

From: Jeff B <jeffb1_at_ureach.com>
Date: Fri, 12 Oct 2001 20:09:48 -0400

Hi.. I'd really appreciate some help with my curl session
trying to use CURLOPT_COOKIEFILE. It seems that I cannot get
cURL to write or use a cookie file.

My code is below:

<?
$ch = curl_init();
$url="https://www.idregister.org/servlets/customerLogin?";

$request= "user=jeffb&pwd=xxx";
curl_setopt($ch, CURLOPT_TIMEOUT, 12000);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0");
curl_setopt($ch, CURLOPT_REFERER, $url);
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
curl_exec($ch);

$request="step=select&domainList=abc.com%0D%
0A&registerYears=1&modifyType=use&contactID=COMLLC&newName=&ne

wAddress=&newCity=&newState=&newCountry=US&newZip=&newPhone=&new
Fax=&newEmail=";

curl_setopt($ch, CURLOPT_TIMEOUT, 12000);
curl_setopt($ch,
CURLOPT_URL, "https://www.idregister.org/servlets/resellerRegist
erDomains?");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FILE, $file);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0");
curl_setopt($ch,
CURLOPT_REFERER, "https://www.idregister.org/servlets/resellerRe
gisterDomains");
curl_setopt($ch, CURLOPT_COOKIEFILE, "cookie.txt");
curl_exec($ch);
curl_close($ch)

Thanks in advance for your help

________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
Received on 2001-10-13