Last active
April 26, 2020 12:56
-
-
Save agungsp2000/21b187de1570ce1046476534ebdb8c89 to your computer and use it in GitHub Desktop.
index.php pelajarandigital ke-2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$fromid = urldecode($_REQUEST['nomor']); | |
$txt = urldecode($_REQUEST['msg']); | |
$tcap=strtoupper($txt); | |
$tz_object = new DateTimeZone('Asia/Jakarta'); | |
$datetime = new DateTime(); | |
$datetime->setTimezone($tz_object); | |
$timestamp=$datetime->format('Y\-m\-d\ H:i:s'); | |
require_once __DIR__ . '/db_config.php'; | |
$con = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD, DB_DATABASE); | |
// mysqli_query($con,”insert into log values(‘$fromid’)”); | |
if( !(strpos($tcap, "HALO")===false)) | |
{ | |
echo "Apa kabar sekarang tanggal $timestamp"; | |
} | |
else if( !(strpos($tcap, "ALL")===false)) | |
{ | |
echo " | |
1. satu | |
2. dua | |
3. tiga | |
"; | |
} | |
else echo " | |
Silakan pilih menu yang disediakan | |
1. @HELP | |
2. @TIME | |
3. PRODUK | |
"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment