<html><head></head><body><pre>
<?php
echo "<b><br />";
echo htmlentities(file_get_contents( __FILE__ )), "</b><br /><hr /><br /><br/>";
$fields = array( 'user' => 'siiga_1', 'password' => 'LkkayBha728!y8x566#@|~#6a3ABBh_:MHag716' );
echo urlencode( $fields['password']);
echo "<br><hr>";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://ws.grtt.cl/v1/Login");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query( $fields ) );
$output = curl_exec($ch);
if(curl_exec($ch) === false)
{
echo 'Curl error: ' . curl_error($ch);
}else{
print_r( json_decode($output ));
}
curl_close($ch);
LkkayBha728%21y8x566%23%40%7C%7E%236a3ABBh_%3AMHag716
stdClass Object
(
[http_response_code] => 200
[http_message] => OK
[error] =>
[errno] => 0
[debug] => Array
(
)
[data] => stdClass Object
(
[logged] => 1
[token] => xhyjaDDZOotqGWQCsqpunvPydk8ep7OfPJIlGZZF5wRYfzQvhhelDDesGGinWhLD
[id] => 3
)
)