Skip to content

Instantly share code, notes, and snippets.

View tingplenting's full-sized avatar

Kar tingplenting

  • tingplenting.github.io
  • Yogyakarta, Indonesia
View GitHub Profile
<?php
require '../simple_html_dom.php';
function grab_html($url)
{
$file = file_get_contents($url);
return $file;
}
// http://php.net/manual/en/book.dom.php#89718
<?php
class DB {
private static $_MYSQL_HOST="localhost";
private static $_MYSQL_USER="your_mysql_user";
private static $_MYSQL_PASS="your_mysql_password";
private static $_MYSQL_DB="your_mysql_database";
private static $connect = null;
@tingplenting
tingplenting / pinterest-sort-repins.js
Created March 20, 2016 02:45 — forked from techslides/pinterest-sort-repins.js
Auto Sort Pinterest Pins by Repins
//Go to any page with pins (a board, your pins, search results, etc) and open JavaScript Console (Ctrl+Shift+J on windows OR option+command+J on mac) and paste in this code:
//sort by repins, adjust amount of pins/pages you want to collect first
var pages = 5;
var count = 0;
var mylist = [];
var timeout;
load();
function load(){
<?php
/**
* Response Code Multi Curl
* @param array $urls list url
* @return array
*/
function checkHttpCode($urls) {
$user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
@tingplenting
tingplenting / spintax.php
Created December 13, 2015 16:36 — forked from irazasyed/spintax.php
PHP: Text Spinner Class - Nested spinning supported.
<?PHP
/**
* Spintax - A helper class to process Spintax strings.
* @name Spintax
* @author Jason Davis - https://www.codedevelopr.com/
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/
*/
class Spintax
{
public function process($text)