Forum Moderators: coopster
Pretty simple, get the content from a url (which I control, nothing shady) and making that url think the cookie exists by sending it info in a custom request. The site in question is jsp and then I would use php to include the info and keep it from bouncing me to the login page because the cookie isn't really there.
I'm not looking for a work around, just an idea of how this could be done or a pointer in the right direction.
The only idea I would come up with is to use a local proxy server which puts the custom cookie into your browser's request. I've got a copy of "Java Examples in a Nutshell" from O'Reilly which has several examples of different kinds of servers; this could give you some very helpfull ideas.
function AUTH_SITE_COOKIE_STORE($LOGINURL,$POSTFIELDS)
{
$parseURL = parse_url($LOGINURL);$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, "$parseURL[host].cookie");
curl_setopt($ch, CURLOPT_URL,"$LOGINURL");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "$POSTFIELDS");ob_start();
curl_exec ($ch);
ob_end_clean();curl_close ($ch);
return "$parseURL[host].cookie";
}
Take a look at PHP [php.net]'s site under cURL [php.net].
noSanity