Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>User</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto|Varela+Round">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<?php
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING)); //hilangkan eror
ini_set('max_execution_time', 0); // max execution
$conn = new mysqli("localhost", "root", "", "kristiandes"); //sesuaikan database
?>
<h1>kristiandes.com</h1>
<!-- END HEADER LAYOUT -->
<!-- HEADER TABLE -->
<?php
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING)); //hilangkan eror
ini_set('max_execution_time', 0); // max execution
$conn = new mysqli("localhost", "root", "", "kristiandes"); //sesuaikan database
$n = $_POST['n'];
for ($i=1; $i<=$n; $i++)
{
$id_sim = $_POST['id_sim'.$i];
<!--
KRISTIAN DES NATALIS
DEV.#SuperKey
-->
<title>[Blog Kristian] blog.kristiandes.com</title>
<?php
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
ini_set('max_execution_time', 3000);
date_default_timezone_set('Asia/Jakarta');
$lastupdate = date("d-m-Y H:i:s");
<?php
echo "<table border='1' class='mainhati'>";
$url = 'http://gilabola.com/internasional/jadwal-bola-malam-ini/';
$content = file_get_contents($url);
$first_step = explode( '<tbody class="row-hover">' , $content );
$second_step = explode("</tbody>" , $first_step[1] );
$text1 = $second_step[0];
echo $text1;
echo "</table>";
?>
@333crist
333crist / parser-php-version.php
Created November 18, 2018 16:43
Migrasi PHP 5 ke PHP 7
<?php
# PHP MySQL to MySQLi migration shim library
# purpose: Redefines deprecated or missing mysql_ functions and calls mysqli_ functions for PHP5.5+.
# website: http://mysql.dotpointer.com/
# author: Robert Klebe, dotpointer, dotpointer at gmail.com
# licensing: Public domain, edit and share without permission.
# changelog
# 2013-09-24 xx:xx:xx - first version
@333crist
333crist / utctolocal.php
Created November 18, 2018 16:38
Converting UTC to Local Time PHP
<?php
//Standart waktu di Indonesia
date_default_timezone_set('Asia/Jakarta');
//Contoh Variable Waktu dengan format UTC
$timeutc = "2018-09-17T00:20:00Z";
//CONVERT UTC TO LOKAL dengan format tgl/bln/thn jam:menit:detik
$time1 = strtotime($timeutc.' UTC');
$format1 = date("Y-m-d H:i:s", $time1);
@333crist
333crist / jam.php
Created November 18, 2018 16:33
Jam Digital di PHP
<?php
date_default_timezone_set("Asia/Bangkok");
?>
<script type="text/javascript">
function date_time(id)
{
date = new Date;
year = date.getFullYear();
month = date.getMonth();
@333crist
333crist / upload.php
Last active April 21, 2018 04:13
Import Data Dari CSV ke MySQL dengan PHP Native
<h2>Upload Biodata</h2>
<?php
ini_set('max_execution_time', 3000);
if (!$_POST) { ?>
<html>
<body>
<form action="" method="post" enctype="multipart/form-data">
Choose your file:
<input name="csv" type="file" id="csv" />
<br>
@333crist
333crist / grab.php
Last active December 1, 2018 16:17
Grabbing Content kristiandes.com
<?php
// URL TARGET
$url = 'http://blog.kristiandes.com/grabbing-jadwal-bola-hari-ini/';
//end
// get / mengambil content berdasarkan url yang akan di curi datanya
$content = file_get_contents($url);
//
// STEP 1 mengambil syntax pembuka
$first_step = explode( "<table border='1' class='mainhati'>" , $content );
//