In my organization, I can access all the printer details by typing the IP of that printer in the Browser's URL. The Logs page of the printer has a dynamic URL(with a 'dummy' variable changing at each instant..their source code involves usage of the Date and getTime functions).Basically i am accessing remote ui of Canon iR3570 . Well this is the code i wrote for generating the dynamic http address of the logs page.
<html>
<head>
<script type="text/javascript">
function getu() {
var now_time = new Date();
var cgi_str = "http://<ip>/jlp.cgi?Flag=Html_Data&LogType=0&Dummy=" + now_time.getTime();
document.getElementById("address").value=cgi_str ;
}
</script>
</head
<body onLoad="getu()">
<form id="mldsform" action="curlexp2.php" method="get" >
<input type="hidden" id="address" name="address" />
<input type="submit" name="submit" value="Log In" />
</form>
</body>
</html>
-------And the curlexp2.php has the code:-------------------
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$_GET["address"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20100101 Firefox/13.0.1');
$result= curl_exec($ch);
echo $result;
curl_close ($ch);
This is what i get on execution:
User information is disabled.
This operation cannot be accepted. User certification is invalid or date expired.
Update page.
However when i just echo out $_GET["address"], i am able to get the correct address. Any clues anyone?? Thanks in advance for your help.


