<?php require '../2.wsc/ws_client.php'; // Get parameters from URL $v_prop_nama = isset($_REQUEST["prop_nama"]) ? $_REQUEST["prop_nama"] : ''; $v_prop_nama = '%' . $v_prop_nama . '%'; $v_prop_nama = (string) $v_prop_nama; $v_page = 0; $v_page_size = 100; // call list propinsi WSC function $ws_data = call_ws_list_propinsi($v_prop_nama, $v_page, $v_page_size); $n = $ws_data['data_count']; $prop_data = $ws_data['data']; // Start XML file, create parent node $dom = new DOMDocument("1.0"); $node = $dom->createElement("markers"); $parnode = $dom->appendChild($node); header("Content-type: text/xml"); // Iterate through the rows, adding XML nodes for each for ($i = 0; $i < $n; $i++) { $jml = $prop_data[$i]['prop_jml_penduduk_pria'] + $prop_data[$i]['prop_jml_penduduk_wanita']; $node = $dom->createElement("marker"); $newnode = $parnode->appendChild($node); $newnode->setAttribute("prop_nama", $prop_data[$i]['prop_nama']); $newnode->setAttribute("prop_ibukota", $prop_data[$i]['prop_ibukota']); $newnode->setAttribute("prop_penduduk", $jml); $newnode->setAttribute("prop_penduduk_pria", $prop_data[$i]['prop_jml_penduduk_pria']); $newnode->setAttribute("prop_penduduk_wanita", $prop_data[$i]['prop_jml_penduduk_wanita']); $newnode->setAttribute("prop_website", $prop_data[$i]['prop_website']); $newnode->setAttribute("lat", $prop_data[$i]['prop_map_latitude']); $newnode->setAttribute("lng", $prop_data[$i]['prop_map_longitude']);
<?php require 'ws_client.php'; // call list propinsi WSC function $ws_data = call_ws_list_propinsi('', 0, 100); $n = $ws_data['data_count']; $prop_data = $ws_data['data']; ?> <table border="1"> <caption>Daftar Jumlah Penduduk Propinsi di Indonesia</caption> <tr> <th>ID</th> <th>KODE</th> <th>NAMA</th> <th>IBUKOTA</th> <th>JML PRIA</th> <th>JML WANITA</th> <th>JML PENDUDUK</th> <th>WEBSITE</th> <th>LATITUDE</th> <th>LONGITUDE</th> </tr> <tbody> <?php for ($i = 0; $i < $n; $i++) { $jml = $prop_data[$i]['prop_jml_penduduk_pria'] + $prop_data[$i]['prop_jml_penduduk_pria']; ?> <tr> <td><?php echo $prop_data[$i]['prop_id']; ?>