View Single Post
  #7 (permalink)  
Old 12-13-2005, 02:32 PM
webmasterjunkie webmasterjunkie is offline
WebProWorld Pro
 

Join Date: Aug 2004
Location: Maryland
Posts: 219
webmasterjunkie RepRank 0
Default

OK, I made small changes to the script we've worked on. This is what I have now:
Code:
<?php

$user_socom_name = "";
$user_socom_pass = "";
$socom_stats_for = "INSANE.CASPER";

// login and store cookie data
$cookielocation = "socomcookies.txt";
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookielocation);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookielocation);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$url = "https://socom3html-prod.svo.pdonline.scea.com:10079/SOCOM3_HTML/account/Account_Login_Submit.jsp";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "userName=" . $user_socom_name . "&passWord=" . $user_socom_pass);
$result = curl_exec($ch);

// get actual data
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookielocation);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookielocation);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$url = "http://socom3html-prod.svo.pdonline.scea.com:10070/SOCOM3_HTML/stats/Stats_CareerSearch_Submit.jsp?userName=" . $socom_stats_for . "&gameMode=0";
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
$content = curl_exec($ch);
curl_close($ch);
$content = ereg_replace('"/', '"http://socom3html-prod.svo.pdonline.scea.com:10070/', $content);
echo $content;

?>
Now the socomcookies.txt file has something in it:
Code:
# Netscape HTTP Cookie File
# http://www.netscape.com/newsref/std/cookie_spec.html
# This file was generated by libcurl! Edit at your own risk.

socom3html-prod.svo.pdonline.scea.com	FALSE	/SOCOM3_HTML	FALSE	0	JSESSIONID	DFA9DF36522315F8775B6C2B0F58615C
It still will not allow me to access the page we are aiming for though. I know you'r ebusy, but I just wanted to update you.
Reply With Quote