Sampah
Sampah
Sampah
com/tutorial-7/scrape-product-data-from-tokopedia
http://www.jacobward.co.uk/using-php-to-scrape-javascript-jquery-json-websites/
http://alfathdirk.github.io/2018/12/12/Scraping-tokopedia-with-Luwak/
https://www.tokopedia.com/search?st=product&q=usb
https://blog.javan.co.id/teknik-dasar-web-scraping-aa7d7e223093
<?php
class NCRSilverScraper {
$this->loginUrl = 'https://mystore.ncrsilver.com/app/Account/LogOn';
if ($login->success == 1) {
// Successful login
$message = 'Successful login.'; // Assigning successful message
echo $message;
} elseif ($login->success == 0) {
$message = $login->error; // Assigning login error message
returned by server
echo $message;
exit(); // Ending program
} else {
$message = 'Unknown login error.'; // Assigning unknown login
error message
echo $message;
exit(); // Ending program
}
}
$searchUrl = 'https://mystore.ncrsilver.com/app/Customer/GetCustomers';
$postValues = array(
'PageRowCount' => 1000,
'RequestedPageNum' => 1,
'TotalRowCount' => -1,
'SearchArg' => $searchString,
'SortDirection' => 'ASC',
'SortColumn' => 'Name',
'page' => 1,
'start' => 0,
'limit' => 1000,
'sort' => '[{"property":"Name","direction":"ASC"}]',
'isAjaxRequest' => true,
);
return $search;
}
return $results;
}
?>
<?php
$ku_user = �usernya�;
$ku_pass = �passwordnya�;
//jalankan curl
//mulai
$result = $pecah[1];
//sampe
$result = $pecah2[0];
print_r($result);
?>
<?php
$ku_user = �usernya�;
$ku_pass = �passwordnya�;
//jalankan curl
//mulai
$result = $pecah[1];
//sampe
$result = $pecah2[0];
print_r($result);
?>
<?php
$sumber = 'http://ppid.jakarta.go.id/json?
url=http://data.jakarta.go.id/dataset/06f19910-82c3-428f-9e13-
14d848486f69/resource/a7cc5803-9993-427b-a3df-9745a233b38d/download/Lomba-
bercerita-anak-TerbaikEdited.csv';
$konten = file_get_contents($sumber);
$data = json_decode($konten, true);
//echo $data[1]["nama_lokasi"];
echo "<h1 align='center'>Jumlah lomba anak bercerita terbaik jakarta ada
".count($data)." Siswa dan Siswi</h1>";
echo "<br/>";
?>
<!DOCTYPE html>
<html>
<head>
<title>Menampilkan data json</title>
<style>
table {
width: 100%;
}
table tr td {
padding: 1rem;
}
</style>
</head>
<body>
<table border="1">
<tr>
<th>No</th>
<th>Tahun</th>
<th>Jenis Lomba</th>
<th>Juara</th>
<th>Nama</th>
<th>Sekolah</th>
<th>ID</th>
</tr>
<?php
for($a=0; $a < count($data); $a++)
{
print "<tr>";
// penomeran otomatis
print "<td>".$a."</td>";
// menayangkan
print "<td>".$data[$a]['tahun']."</td>";
print "<td>".$data[$a]['jenis']."</td>";
print "<td>".$data[$a]['juara']."</td>";
print "<td>".$data[$a]['nama']."</td>";
print "<td>".$data[$a]['sekolah']."</td>";
print "<td>".$data[$a]['id']."</td>";
print "</tr>";
}
?>
</table>
</body>
</html>
http://ppid.jakarta.go.id/json?url=http://data.jakarta.go.id/dataset/06f19910-82c3-
428f-9e13-14d848486f69/resource/a7cc5803-9993-427b-a3df-
9745a233b38d/download/Lomba-bercerita-anak-TerbaikEdited.csv