Hello, i need some help with a php script.
I want to use this script to authenticate on another website, and browsing authenticated another page on my website.
That website is used to test your abilities for the driver's licence, and it requires a email and password to authenticate and be able to take those driver's licence tests.
This is how the script looks (i copied some examples)....please help:
<?php
$url = "http://phtweet.info/Test2.html";
$login = "http://www.drpciv.ro/info-portal/authenticateSubscriber.do";
$c = curl_init();
curl_setopt($c, CURLOPT_COOKIEJAR, "cookies.txt");
curl_setopt($c, CURLOPT_URL, $login);
curl_setopt($c, CURLOPT_POST, 1);
curl_setopt($c, CURLOPT_POSTFIELDS, "email=kairon.monden@gmail.com&password=xxx");
ob_start();
curl_exec($c);
ob_end_clean();
curl_close($c);
unset($c);
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_COOKIEFILE, "cookies.txt");
curl_setopt($c, CURLOPT_URL, $url);
$new_src = curl_exec($c);
echo $new_src;
curl_close($c);
unset($c);
$debugg=yes;
?>