File "send.php"
Full path: /www/geye_t/send.php
File size: 1.03 KiB (1056 bytes)
MIME-type: text/x-php
Charset: utf-8
<?php
//===============================================
// HTML-HEAD-
// 備考 :
// 更新 : 2012/10/18 KMK-Teraoka
//===============================================
print "<html>";
print "<head>";
print "<meta http-equiv=\"content-type\" content=\"text/html;charset=utf-8\">";
print "<link rel=\"stylesheet\" type=\"text/css\" href=\"/ansys/config/css/style.css\">";
print "<link rel=\"shortcut icon\" href=\"/ansys/config/favicon.ico\">";
print "<title>GEYEテスト</title>";
print "</head>";
?>
<script type="text/javascript">
var xhr = new XMLHttpRequest();
var data = {
a: 5,
b: "san",
c: [0, 1, 2, 3],
d: {
"A": 1,
"B": 2
}
};
var jsonText = JSON.stringify("AABBCCDD"); // ここで、dataをJSON文字列に変換
xhr.open("POST", "https://penta-02.ptgw.net/geye_t/recv_t.php");
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.send(jsonText);
</script>
<?php
//===========================
// 終端
//===========================
print "<hr />";
print "</body>";
print "</html>";
?>