curl-and-php
HTTP Status 400 - Invalid direct reference to form login page
Date: Thu, 01 Feb 2007 12:28:32 +0100
Hi to all
The code below, doesn't work i tried everything else ...
Maybe someone has the Sun Java System installed.
I think no changes have made in that file on the server.
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, "MSIE 6.0; Windows NT 5.0");
curl_setopt($ch,
CURLOPT_URL,'https://212.XXX.XXX.XXX/dir/j_security_check');
curl_setopt($ch, CURLOPT_REFERER, 'http://212.XXX.XXX.XXX/dir/Start');
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, "/tmp/cookies.txt");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,FALSE);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch,
CURLOPT_POSTFIELDS,"log_button=Login&j_username=username&j_password=password");
curl_exec ($ch);
curl_close ($ch);
and i get
HTTP Status 400 - Invalid direct reference to form login page
________________________________________________________________________
type Status report
message Invalid direct reference to form login page
description The request sent by the client was syntactically incorrect
(Invalid direct reference to form login page).
________________________________________________________________________
Sun-Java-System/Application-Server
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-02-01