2022-07-13 02:15:01 +00:00
|
|
|
<?php
|
|
|
|
|
2022-07-13 02:54:47 +00:00
|
|
|
|
|
|
|
if ($argc != 4)
|
|
|
|
{
|
|
|
|
echo "please put in game_id version serial\n";
|
|
|
|
echo "example php downloadorder.php SDBT 1.00 A63E01B1628\n";
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-07-13 02:15:01 +00:00
|
|
|
error_reporting(1);
|
|
|
|
|
2022-07-13 02:54:47 +00:00
|
|
|
$game_id = $argv[1];
|
|
|
|
$ver = $argv[2];
|
|
|
|
$serial = $argv[3];
|
2022-07-13 02:15:01 +00:00
|
|
|
|
2022-07-13 02:54:47 +00:00
|
|
|
echo $game_id . "\n";
|
|
|
|
echo $ver . "\n";
|
|
|
|
echo $serial . "\n";
|
2022-07-13 02:15:01 +00:00
|
|
|
|
2022-07-13 02:54:47 +00:00
|
|
|
$compressed = base64_encode(gzdeflate("game_id=".$game_id."&ver=".$ver."&serial=".$serial, -1, ZLIB_ENCODING_DEFLATE));
|
2022-07-13 02:15:01 +00:00
|
|
|
|
|
|
|
//print($compressed);
|
|
|
|
|
|
|
|
// use key 'http' even if you send the request to https://...
|
|
|
|
|
|
|
|
$options = array(
|
|
|
|
|
|
|
|
'http' => array(
|
|
|
|
|
2022-07-13 02:54:47 +00:00
|
|
|
'header' => array("Pragma: DFI", "User-Agent: ALL.Net"),
|
2022-07-13 02:15:01 +00:00
|
|
|
|
|
|
|
'method' => 'POST',
|
|
|
|
|
|
|
|
'content' => $compressed
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
$context = stream_context_create($options);
|
|
|
|
|
|
|
|
$result = file_get_contents('http://naominet.jp/sys/servlet/DownloadOrder', false, $context);
|
|
|
|
|
|
|
|
if ($result === FALSE) { exit("error dl\n"); /* Handle error */ }
|
|
|
|
|
|
|
|
//print($result);
|
|
|
|
|
|
|
|
$response = gzuncompress(base64_decode($result));
|
|
|
|
|
|
|
|
print($response);
|
|
|
|
|
2022-07-13 02:54:47 +00:00
|
|
|
print("\n");
|
2022-07-13 02:15:01 +00:00
|
|
|
|
|
|
|
?>
|