Ok,
What I am trying to do is make a program that lets me search through another sites database of golf courses and display the results (after formatting and stuff...). The problem I have is the page i would need to download and format is behind a login page (which I do have the login/pass for). I was told I could use cURL to fake the post of the login and password from the site so I did that however it is still not allowing me to download the page from behind the login. Sorry for the long explanation ill just show you some code now...
The page I need to login to is here: http://www.axiagolf.com/gametrack/index.asp?ax=gpot
And the page I am trying to access via PHP after logging in is:
http://www.axiagolf.com/gametrack/course/course_profile.asp?strCourseID=00001
And finally heres some code:
$URL="www.axiagolf.com/gametrack/login_check.asp";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://$URL");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "t_user_name=bink&t_password=pass&c_save_login=1");curl_exec ($ch);
curl_close ($ch);
$file = "http://www.axiagolf.com/gametrack/course/course_profile.asp?strCourseID=00001";
readfile($file);
That code I thought should just output the page I grabbed however it gives me the error:
Warning: readfile("http://www.axiagolf.com/gametrack/course/course_profile.asp?strCourseID=00001") - Success in /home/www/html/customscorecards/axiasave.php on line 40
Any advice would be greatly appreciated but please keep in mind that I am new to this language so please explain!
Thanks again and sorry for taking all your time,
Kevin