Skip to content

Instantly share code, notes, and snippets.

@phpfiddle
phpfiddle / fiddle_056268.php
Created August 9, 2019 22:41
[ Posted by Benahmed ] just a json response from php file
<?php
echo json_encode([
["id"=>1,"nom"=>"nom 1"],
["id"=>2,"nom"=>"nom 2"]
]);
?>
@phpfiddle
phpfiddle / fiddle_084878.php
Created July 24, 2019 16:06
[ Posted by Sany ] sany&#039;s win win snippet
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
<div id="container" style="min-width: 300px; height: 400px; margin: 0 auto"></div>
<?php
// Function to print ramdom numbers
function randomNumbers(){
$randoms= [];
for ($rnd=1;$rnd<=80;$rnd++)
{
@phpfiddle
phpfiddle / fiddle_085437.php
Created July 23, 2019 15:56
[ Posted by Alfredo Pou ] API de Mercado Libre Meli.php
<?php
class Meli {
/**
* @version 2.0.0
*/
const VERSION = "2.0.0";
/**
* @var $API_ROOT_URL is a main URL to access the Meli API's.
* @var $AUTH_URL is a url to redirect the user for login.
*/
@phpfiddle
phpfiddle / fiddle_026150.php
Created July 17, 2019 17:13
[ Posted by Tommie C ] PHP object access conversion to array.
<?php
class Foo
{
public $bar = 'barValue';
protected $baz = 'bazValue';
private $tab = 'tabValue';
}
$foo = new Foo();
@phpfiddle
phpfiddle / fiddle_085440.php
Created July 17, 2019 16:37
[ Posted by Tommie C ] Convert PHP object to array using JSON methods
<?php
$nested_object = new stdClass;
$nested_object->apple = "apple value";
$nested_object->orange = "orange value";
$nested_object->grape = "grape value";
$nested_object->pear = "pear value";
$array = json_decode(json_encode($nested_object), true);
var_dump($nested_object, "object converted to array using json methods" , $array);
?>
@phpfiddle
phpfiddle / fiddle_087898.php
Created June 24, 2019 17:10
[ Posted by Jon ] Added Hello World
<?php
echo "Hello World"
?>
@phpfiddle
phpfiddle / fiddle_046506.php
Created June 24, 2019 17:07
[ Posted by Jon ] Initial commit
<?php
?>
@phpfiddle
phpfiddle / fiddle_063094.php
Created June 3, 2019 01:18
[ Posted by Re0 ] 6xrZR56Xm6xrZR56Xm6xrZR56Xm6xrZR56Xm6xrZR56Xm
<?php
// Script Name: Afficher adressse IP dans une image
// Script URI: http://crash-blog.com/afficher-adresse-ip-dans-une-image/
// Description: Afficher adresse IP dans un image en utilisant la librairie GD.
// Author: Crashmaster
// Author URI: http://crash-blog.com/
// License: GPLv2 or later
// configuration
@phpfiddle
phpfiddle / fiddle_047578.php
Created June 3, 2019 01:12
[ Posted by Re0 ] tes test test test test
<?php
// Script Name: Afficher adressse IP dans une image
// Script URI: http://crash-blog.com/afficher-adresse-ip-dans-une-image/
// Description: Afficher adresse IP dans un image en utilisant la librairie GD.
// Author: Crashmaster
// Author URI: http://crash-blog.com/
// License: GPLv2 or later
// configuration
@phpfiddle
phpfiddle / fiddle_029799.php
Created May 22, 2019 10:37
[ Posted by Deepak Rajpal ] test description for
<?php
echo "abc";
?>