Skip to content

Instantly share code, notes, and snippets.

@phpfiddle
phpfiddle / fiddle_021687.php
Created May 7, 2017 01:20
[ Posted by Johnny Cheng ] this is php file
<?php
// Start the session
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="lab7.css">
@phpfiddle
phpfiddle / fiddle_026847.php
Created May 7, 2017 01:16
[ Posted by Inkyu ] comp484_assignment7
body {
font-family: 'ubuntu';
}
fieldset {
margin-left: 10%;
margin-right: 10%;
width: 80%;
font-size: 0.8em;
}
@media screen and (max-width: 699px) and (min-width: 520px) {
@phpfiddle
phpfiddle / fiddle_081354.php
Created May 7, 2017 01:09
[ Posted by Inkyu ] COMP484_Assignment#7
<?php
// Start the session
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<link href='http://fonts.googleapis.com/css?family=Ubuntu:400,400italic,700,700italic' rel='stylesheet' type='text/css'>
@phpfiddle
phpfiddle / fiddle_058570.php
Created May 2, 2017 08:46
[ Posted by Trungkienpvt ] Example for magic method
<?php
//magic method
class Foo
{
public function __call($method, $arguments)
{
echo "Called $method","\n";
}
static public function __callStatic($method, $arguments)
@phpfiddle
phpfiddle / fiddle_036147.php
Created May 1, 2017 23:46
[ Posted by Ino ] For loop exercise
<?php
echo '<pre>';
$msg = '';
for ($i = 1; $i < 10; $i++) {
$msg = '';
for ($j = 1; $j < 10; $j++) {
$msg .= $i * $j . (($i * $j < 10) ? ' -- ' : ' - ');
}
echo $msg . '<br>';
}
@phpfiddle
phpfiddle / fiddle_069986.php
Created May 1, 2017 17:51
[ Posted by Gaston Crivelli ] Primera version
<?php
$TPLL = 0;
$T = 0;
//$TPSC = HV;
//$TPSV = [HV,HV...HV]
$STOC = 0;
//$STOV=[0,0...0]
//$ITO=[0,0...0]
$NSTVN = 0;
@phpfiddle
phpfiddle / fiddle_049181.php
Created May 1, 2017 11:25
[ Posted by David Boden ] ImageCubeExtraColours
<?php
/*
* ImageCube by Lars Vandenbergh
* 3rd septmber 2004
*
* A PHP script for generating static 3D views of the 3x3x3 Rubik's Cube
*/
// initialize paramaters
@phpfiddle
phpfiddle / fiddle_053221.php
Created April 23, 2017 02:02
[ Posted by Stephanie ] gogo go fast
<?php
$i5=0;
foreach ($items5 as $item5) {
if ($i5 <= 0) {
printf('<div class="sports-flex-parent boxx-shadow" style="margin-top: 50px">');
printf('<div class="sports-item " >');
printf('<img src="%s" style="max-height: 300px">', $item5['image5']);
printf('</div>');
printf('<div class="sports-imgtext">');
@phpfiddle
phpfiddle / fiddle_082219.php
Created April 21, 2017 15:34
[ Posted by Stephanie ] hogogogoog
<?php
$url3 = "http://rss.nytimes.com/services/xml/rss/nyt/US.xml"; // xmld.xml contains above data
$feeds3 = file_get_contents($url3);
$rss3 = simplexml_load_string($feeds3);
$items3 = [];
foreach($rss3->channel->item as $entry3) {
$image3 = '';
@phpfiddle
phpfiddle / fiddle_099788.php
Created April 21, 2017 15:32
[ Posted by Stephanie ] work1 2222
<?php
$url3 = "http://rss.nytimes.com/services/xml/rss/nyt/US.xml"; // xmld.xml contains above data
$feeds3 = file_get_contents($url3);
$rss3 = simplexml_load_string($feeds3);
$items3 = [];
foreach($rss3->channel->item as $entry3) {
$image3 = '';