Skip to content

Instantly share code, notes, and snippets.

View dedikisme's full-sized avatar

Dedy Kurniawan dedikisme

View GitHub Profile
@dedikisme
dedikisme / masscheck-twitter.php
Created October 26, 2012 19:39
MassChecker username twitter
<?php
$input=$_REQUEST[input];
$data=explode("\n",$input);
for($i=0;$i<count($data);$i++){
$username=str_replace(array("\r\n", "\r", "\n"),"",$data[$i]);
$url = file_get_contents("https://twitter.com/users/username_available?&username=$username");
$convert = explode(',', $url);
$hapus = array('&quot;msg&quot;:&quot;','&quot;}');
$hasil =str_replace($hapus,'',htmlentities($convert[3]));
echo "<b>$username</b>: $hasil <br>";
@dedikisme
dedikisme / twit.py
Last active December 19, 2015 17:48
#!/usr/bin/env python
import sys
import tweepy
customer_key= 'AQdBj5LwLiGtqpFnjOYrKA'
customer_secret='DJCieDljb2npbowla6E97vm9O0dURtQyLU2KB0pycQ'
opt=['Update Status','Follow','Unfollow']
app = [
{
'namaakun':'DedikFansClub',
'ak':'',
<?php
error_reporting(0);
?>
<title>mass mail</title>
<form name="formmail" method="post">
<table>
<tr>
<td>Dari</td>
<td><input name="dari" value="<?php echo $_POST[dari] ?>"></td>
<?php
$params = array_merge(
require(__DIR__ . '/../../common/config/params.php'),
require(__DIR__ . '/../../common/config/params-local.php'),
require(__DIR__ . '/params.php'),
require(__DIR__ . '/params-local.php')
);
return [
'id' => 'app-backend',
<?php
public function actionContact()
{
$model = new DynamicModel([
'name', 'body'
]);
$model->addRule(['name', 'body'], 'required')
->addRule(['name'],'unique');
<?php
//class Controller
public function actionContact()
{
$model = new DynamicModel([
'name', 'body'
]);
$model->addRule(['name', 'body'], 'required')
<?php
use yii\widgets\ActiveForm;
use yii\helpers\Html;
?>
<div class="row">
<div class="col-lg-5">
<?php $form = ActiveForm::begin(['id' => 'contact-form']); ?>
<?= $form->field($model, 'name[]') ?>
<?= $form->field($model, 'body[]')->textArea(['rows' => 6]) ?>
<?= $form->field($model, 'name[]') ?>
<?php
class Alamat extends CFormModel {
public $alamat;
public $telp;
public $latitude;
public $longitude;
/**
<?php
/**
* This is the model class for table "reg".
*
* The followings are the available columns in table 'reg':
* @property integer $id_reg
* @property string $nama_reg
* @property string $value
*/
<?php
class RegController extends Controller {
/**
* @var string the default layout for the views. Defaults to '//layouts/column2', meaning
* using two-column layout. See 'protected/views/layouts/column2.php'.
*/
public $layout = '//layouts/column2';