| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?php
- include $_SERVER['DOCUMENT_ROOT'].'/common/lib/comm.php';
- // include $_SERVER['DOCUMENT_ROOT'].'/common/auth_chk.php';
- function file_get_contents_utf8($fn) {
- $opts = array(
- 'http' => array(
- 'method'=>"GET",
- 'header'=>"Content-Type: text/html; charset=utf-8"
- )
- );
- $context = stream_context_create($opts);
- $result = @file_get_contents($fn,false,$context);
- return $result;
- }
- header("Content-Type: text/html; charset=utf-8");
- $tPath = "URL YOU WANT TO MODIFY";
- //$result = file_get_contents_utf8("http://".$tPath);
- // $OWNER_NM = $_POST[nm_name];
- // $VHRNO = $_POST[nm_number];
- $OWNER_NM = "구일호";
- $VHRNO = "689소5427";
- // $OWNER_NM = iconv("euc-kr" , "utf-8", $OWNER_NM);
- // $arrCarInfo = array("OWNER_NM"=>$OWNER_NM, "VHRNO"=>$VHRNO);
- // $url = "https://carinfo.dev.carisyou.net/carinfo/esmotors/S1/2";
- $url = "https://carinfo.carisyou.net/carinfo/esmotors/S1/2?VHRNO=$VHRNO&OWNER_NM=$OWNER_NM";
- // $url = "https://carinfo.carisyou.net/carinfo/esmotors/S1/2?VHRNO=$VHRNO&OWNER_NM=$OWNER_NM";
- echo $url;
- echo "<br>";
- //$url = iconv("utf-8", "euc-kr" , $url);
- //echo $url;
- echo "<br>";
- //$url = iconv("euc-kr" , "utf-8", $url);
- //echo $url;
- echo "<br>";
- //exit;
- /*
- request.open("POST", url, true);
- // request.onreadystatechange = updatePage;
- request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- $rData = request.send(json_encode($arrCarInfo));
- */
- //$rData = file_get_contents($url);
- $rData = file_get_contents_utf8($url);
- echo $rData;
- echo "<br>";
- $rData = json_decode($rData, true);
- //echo $rData["created_at"];
- echo $rData;
- echo "<br>";
- echo $rData;
- //mysql_close($connect);
- ?>
|