Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PhpFiddle Initial Code</title>
</head>
<body>
<?php
@phpfiddle
phpfiddle / 19c763e8e5d37d254c5f98549b3ddb64.php
Created July 10, 2013 21:45
[ Posted by Fiddler ] This function calculates how strong a password choice is. A strong password has a value that is as close to possible to 100.
<?php
/**
*
* @param String $string
* @return float
*
* Returns a float between 0 and 100. The closer the number is to 100 the
* the stronger password is; further from 100 the weaker the password is
*/
@phpfiddle
phpfiddle / fiddle_128648.php
Created July 11, 2013 07:44
Base 64 Encoder
<?php
$imagedata = file_get_contents("http://profile.ak.fbcdn.net/hprofile-ak-ash4/369185_100000266719868_760182562_q.jpg");
$base64 = base64_encode($imagedata);
echo $base64;
?>
<img src= "data:image/png;base64,<?php echo $base64; ?>" >
@phpfiddle
phpfiddle / 83e8b079fd5f260dca302fe99b7b3c30.php
Created July 16, 2013 08:50
[ Posted by sketchytech ] Demonstration of json-book code at https://github.com/sketchytech/json-book
<?php
$paragraph_json = '["This is a simple example of how we can ",{"i":"parse"}, " a ",{"b":"JSON"}, " paragraph using ",{"b":"PHP"}, ". This example can employ simple styles like ",{"b":"bold, "}, {"i":["italic,",{"sup":"italic superscript, "}]},{"sup":"superscript "},{"i":{"b":"bold italic "}}," and ",{"sub":"subscript"}, ". The same JSON could be parsed by iOS or Android into a TextView bypassing HTML altogether."]';
$paragraph = json_decode($paragraph_json);
$basic_tags = array("a","b","i","sup","sub","q");
function returnParagraph($paragraph)
{
echo "<p>"; // open paragraph with tag
$i=0;
@phpfiddle
phpfiddle / f9b9ab7e0a856d78c95cbefcde9a0c07.php
Created July 18, 2013 17:51
[ Posted by Rahul ] live edit ajax pagination with sorting
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- This is a pagination script using Jquery, Ajax and PHP
The enhancements done in this script pagination with first,last, previous, next buttons -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Live Edit, Pagination and Delete Records with Jquery</title>
<link href="css_pagination.css" rel="stylesheet" type="text/css" />
<style type="text/css">
@phpfiddle
phpfiddle / f9b9ab7e0a856d78c95cbefcde9a0c07.php
Created July 18, 2013 17:55
[ Posted by Rahul ] ajax page load_data for live edit pagination
<?php
error_reporting(E_ALL^E_NOTICE);
include "db.php";
if($_POST['page'])
{
$page = $_POST['page'];
$cur_page = $page;
$page -= 1;
$per_page = 5; // Per page
$previous_btn = true;
@phpfiddle
phpfiddle / f9b9ab7e0a856d78c95cbefcde9a0c07.php
Created July 18, 2013 17:56
[ Posted by Rahul ] css file for ajax pagination
@charset "utf-8";
/* CSS Document */
body{
width: 800px;
margin: 0 auto;
padding: 0;
font-family:Arial, Helvetica, sans-serif
}
#loading{
@phpfiddle
phpfiddle / fiddle_981744.php
Created July 25, 2013 04:03
New Modified Google Scraper...
<?php
require_once('simple_html_dom.php');
class GoogleScraper
{
private $_results;
private $_baseUrl;
private $_searchQuery;
private $_resultsPerPage;
/**
* constructor
@phpfiddle
phpfiddle / fiddle_961931.php
Created July 30, 2013 08:34
Umhay.net mt.SiniCHi test get
<?php
$link = 'http://s2.truyen18.org/doctruyen/mom-is-my-classmate/chapter-36/96607.html';
$link1 = 'http://truyen.vnsharing.net/Truyen/MTO-SORA-NO-OTOSHIMONO/Chapter-65-Pha%CC%81o-Hoa?id=75988';
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $link1);
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13');
curl_setopt ($ch, CURLOPT_HTTPHEADER, array ( "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language: en-us,en;q=0.5", "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7" ));
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
$tan = curl_exec($ch);
@phpfiddle
phpfiddle / fiddle_514774.php
Created July 30, 2013 14:21
Umhay.net test code getLInk manga
Exm: </br>
http://s2.truyen18.org/doctruyen/mom-is-my-classmate/chapter-36/96607.html </br>
http://truyen.vnsharing.net/Truyen/MTO-SORA-NO-OTOSHIMONO/Chapter-65-Pha%CC%81o-Hoa?id=75988 </br></br>
<!---Form get link -->
<form method="post" action="">
<samp>LINK get:</samp>
<input type="text" name="getlink" size="30" />