Skip to content

Instantly share code, notes, and snippets.

@tonijz
Created November 22, 2013 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonijz/7601659 to your computer and use it in GitHub Desktop.
Save tonijz/7601659 to your computer and use it in GitHub Desktop.
<?php
header('content-type:text/plain');
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'http://10.10.10.2/Web/Common/Login.do');
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, 'username=mvfadmin&password=mvfadmin&submitType=LOGIN');
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_COOKIEJAR, '/tmp/cisco_cookie.txt');
curl_exec($curl);
curl_setopt($curl, CURLOPT_URL, 'http://10.10.10.2/Web/cme/LayoutAction.do?submitType=INIT&page=displayCallHistory');
curl_exec($curl);
curl_setopt($curl, CURLOPT_URL, 'http://10.10.10.2/Web/ITS/ipkeyswitch.do');
echo curl_exec($curl);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment