@ 2016-01-04T23:31:11Z <?php
//unset($_COOKIE['aiepsso']);
$userid="aaron.aguirre";
$rut="17317380";
$timestamp=time();
$courseid="null";
$ruta="null";
$sharedSecret="AIEP";
$macParamsString=$courseid.$rut.$ruta.$timestamp.$userid.$sharedSecret;
$md5String=md5($macParamsString);
$auth=base64_encode($macParamsString);//$md5String);
$host="location:https://aieptest.blackboard.com";
$hostV="https://aiepclone.blackboard.com";
$hostVL="location:https://aiepclone.blackboard.com";
$hostT="location:http://localhost:9876";
$autoSignOnURL="/webapps/oslt-auth-provider-autosignon-BBLEARN/service/login/_142_1";
$params="timestamp=".$timestamp."&userId=".$userid."&courseid=".$courseid."&ruta=".$ruta."&rut=".$rut."&auth=".$md5String;//.$auth;
$bbURL=$hostV.$autoSignOnURL;//.$params;
// header("location:".$bbURL."?".$params);
/////////////////////////CURL////////////////////////
/*$curl=curl_init();
$postParameters=array();
$postParameters['timestamp']=$timestamp;
$postParameters['userId']=$userid;
$postParameters['courseid']=$courseid;
$postParameters['ruta']=$ruta;
$postParameters['rut']=$rut;
$postParameters['auth']=$md5String;
curl_setopt($curl,CURLOPT_URL,$bbURL);
curl_setopt($curl,CURLOPT_POST,sizeof($postParameters));
curl_setopt($curl,CURLOPT_POSTFIELDS,http_build_query($postParameters));
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl,CURLOPT_COOKIE, $cookiesIn);
curl_setopt($curl,CURLOPT_COOKIEFILE, "");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
//curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
$result = curl_exec($curl);
$header = curl_getinfo( $curl );
$err = curl_errno( $curl );
$errmsg = curl_error( $curl );
curl_close($curl);
$header_content = substr($result, 0, $header['header_size']);
$postValue=file_get_contents($bbURL);
$body_content = trim(str_replace($header_content, '', $result));
$pattern = "#Set-Cookie:\\s+(?<cookie>[^=]+=[^;]+)#m";
preg_match_all($pattern, $header_content, $matches);
$cookiesOut = implode("; ", $matches['cookie']);
$header['errno'] = $err;
$header['errmsg'] = $errmsg;
$header['headers'] = $header_content;
$header['content'] = $body_content;
$header['cookies'] = $cookiesOut;
$cookiesValue1=explode("=",$matches[cookie][0]);
$cookiesValue2=explode("=",$matches[cookie][1]);
$cookiesValue3=explode("=",$matches[cookie][2]);
$cookiesValue4=explode("=",$matches[cookie][3]);
$cookiename1=$cookiesValue1[0];
$cookiename2=$cookiesValue2[0];
$cookiename3=$cookiesValue3[0];
$cookiename4=$cookiesValue4[0];
$cookieValue1=$cookiesValue1[1];
$cookieValue2=$cookiesValue2[1];
$cookieValue3=$cookiesValue3[1];
$cookieValue4=$cookiesValue4[1];*/
/* setcookie($cookiename1,$cookieValue1,0,"/");
setcookie($cookiename2,$cookieValue2,0,"/");
setcookie($cookiename3,$cookieValue3,0,"/");
setcookie($cookiename4,$cookieValue4,0,"/");
*/
/* preg_match_all('|Location: (.*)\n|U', $result, $results);
$location = implode(';', $results[1]);
$realLocationA=$results[1];//implode(";",$location);
$realLocation=$realLocationA[2];
setcookie("",$cookiesOut,0,"/",$realLocation);*/
/*setcookie($cookiename1,$cookieValue1,0,"/",$realLocation);
setcookie($cookiename2,$cookieValue2,0,"/",$realLocation);
setcookie($cookiename3,$cookieValue3,0,"/",$realLocation);
setcookie($cookiename4,$cookieValue4,0,"/",$realLocation);*/
//header("Location: $realLocation");
//header("location:".$header['redirect_url']);
//////////////////////////////////////////////////////////////////
///////////////////////////////////////File Get Contents ///////////////////////////
/*$curl=curl_init();
$postParameters=array();
$postParameters['timestamp']=$timestamp;
$postParameters['userId']=$userid;
$postParameters['courseid']=$courseid;
$postParameters['ruta']=$ruta;
$postParameters['rut']=$rut;
$postParameters['auth']=$md5String;
curl_setopt($curl,CURLOPT_URL,$bbURL);
curl_setopt($curl,CURLOPT_POST,sizeof($postParameters));
curl_setopt($curl,CURLOPT_POSTFIELDS,http_build_query($postParameters));
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl,CURLOPT_COOKIE, $cookiesIn);
curl_setopt($curl,CURLOPT_COOKIEFILE, "");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
//curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "POST");
$result = curl_exec($curl);
$header = curl_getinfo( $curl );
$err = curl_errno( $curl );
$errmsg = curl_error( $curl );
curl_close($curl);
$authLocation="location:".$header['url'];
//print $result;
header($authLocation);*/
/* $postdata=http_build_query(array(
'timestamp' => $timestamp,
'userId' => $userid,
'courseid' => $courseid,
'ruta' => $ruta,
'rut' => $rut,
'auth' => $md5String));
$opts=array('https'=>array('method'=>'POST','header'=>"Connection: close\r\n"."Content-Length: ".strlen($postdata)."\r\n",'content'=>$postdata));//$postdata));
$context=stream_context_create($opts);
$resultHtml=file_get_contents($bbURL,false,$context);
echo $resultHtml;*/
//var_dump($result);
//header("location:".$bbURL);
////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////HTTPRequest//////////////////////
/* $http = new HttpRequest($bbURL, HttpRequest::METH_POST);
$http->addPostFields(array(
'timestamp' => $timestamp,
'userId' => $userid,
'courseid' => $courseid,
'ruta' => $ruta,
'rut' => $rut,
'auth' => $md5String
));
$response = $http->send();*/
////////////////////////////////////////////////////////////////
/////////////////////////CURL Less/////////////////////////////
/*$data = array('timestamp' => $timestamp, 'userId' => $userid,'courseid' => $courseid,'ruta' => $ruta,'rut' => $rut, 'auth' => $md5String);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($data),
),
);
$context = stream_context_create($options);
//$result = file_get_contents($bbURL, false, $context);
$fp = fopen($bbURL, 'r', false, $context);
*/
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////http_post_fields()///////////////////////////
/* $postdata=array(
'timestamp' => $timestamp,
'userId' => $userid,
'courseid' => $courseid,
'ruta' => $ruta,
'rut' => $rut,
'auth' => $md5String);
$response=http_post_fields($bbURL,$postdata);
*/
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////HTTP Request////////////////////////////////////////
$r=new http_request($bbURL);
$r->setMethod(HTTP_REQUEST_METHOD_POST);
$r->addPostData('timestamp',$timestamp);
$r->addPostData('userId',$userid);
$r->addPostData('courseid',$courseid);
$r->addPostData('ruta',$ruta);
$r->addPostData('rut',$rut);
$r->addPostData('auth',$md5String);
$r->sendRequest();
$page=$r->getResponseBody();
echo $page;
/////////////////////////////////////////////////////////////////////////////////////
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 7.2.11 0.029 0.003 16.42 7.2.6 0.006 0.006 16.88 7.2.0 0.003 0.013 19.36 7.1.20 0.000 0.012 15.92 7.1.10 0.004 0.009 18.28 7.1.7 0.008 0.000 17.31 7.1.6 0.012 0.009 19.40 7.1.5 0.004 0.018 16.84 7.1.0 0.007 0.073 22.40 7.0.20 0.003 0.007 16.80 7.0.9 0.020 0.057 19.95 7.0.8 0.003 0.087 20.04 7.0.7 0.003 0.090 19.95 7.0.6 0.010 0.083 20.03 7.0.5 0.010 0.077 20.34 7.0.4 0.010 0.047 20.18 7.0.3 0.013 0.077 20.12 7.0.2 0.010 0.090 20.15 7.0.1 0.003 0.090 20.14 7.0.0 0.010 0.080 20.06 5.6.24 0.017 0.070 20.64 5.6.23 0.010 0.080 20.60 5.6.22 0.023 0.067 20.59 5.6.21 0.003 0.070 20.66 5.6.20 0.000 0.077 21.06 5.6.19 0.003 0.087 21.04 5.6.18 0.013 0.083 20.96 5.6.17 0.000 0.067 21.09 5.6.16 0.017 0.073 21.01 5.6.15 0.013 0.053 21.18 5.6.14 0.007 0.080 21.02 5.6.13 0.007 0.050 20.94 5.6.12 0.013 0.087 21.02 5.6.11 0.010 0.077 21.07 5.6.10 0.013 0.077 21.10 5.6.9 0.003 0.090 21.00 5.6.8 0.007 0.047 20.47 5.6.7 0.010 0.070 20.47 5.6.6 0.010 0.047 20.44 5.6.5 0.000 0.080 20.43 5.6.4 0.003 0.083 20.39 5.6.3 0.010 0.073 20.30 5.6.2 0.010 0.080 20.35 5.6.1 0.010 0.063 20.38 5.6.0 0.007 0.053 20.38 5.5.38 0.017 0.073 20.55 5.5.37 0.000 0.070 20.36 5.5.36 0.013 0.077 20.41 5.5.35 0.017 0.070 20.43 5.5.34 0.007 0.047 20.91 5.5.33 0.003 0.090 20.93 5.5.32 0.003 0.083 20.92 5.5.31 0.010 0.083 20.93 5.5.30 0.010 0.080 20.92 5.5.29 0.010 0.057 20.83 5.5.28 0.003 0.067 20.87 5.5.27 0.017 0.070 20.88 5.5.26 0.010 0.083 20.88 5.5.25 0.007 0.080 20.68 5.5.24 0.017 0.070 20.27 5.5.23 0.003 0.080 20.27 5.5.22 0.017 0.067 20.27 5.5.21 0.020 0.063 20.16 5.5.20 0.010 0.063 20.23 5.5.19 0.017 0.073 20.26 5.5.18 0.003 0.077 20.19 5.5.16 0.013 0.070 20.08 5.5.15 0.003 0.087 20.24 5.5.14 0.003 0.053 20.27 5.5.13 0.000 0.043 20.15 5.5.12 0.013 0.063 20.13 5.5.11 0.007 0.043 20.18 5.5.10 0.013 0.067 20.18 5.5.9 0.017 0.083 20.05 5.5.8 0.007 0.067 20.17 5.5.7 0.013 0.043 20.06 5.5.6 0.003 0.083 20.10 5.5.5 0.010 0.057 20.11 5.5.4 0.003 0.077 20.16 5.5.3 0.003 0.047 20.06 5.5.2 0.010 0.080 20.15 5.5.1 0.023 0.040 20.04 5.5.0 0.003 0.073 20.04
preferences:dark mode live preview
36.39 ms | 400 KiB | 5 Q