This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 = ''; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace BDA\AdminBundle\Controller; | |
use Symfony\Component\HttpFoundation\JsonResponse; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; | |
use JMS\SecurityExtraBundle\Annotation\Secure; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Ejemplo{ | |
public $color=""; | |
public $altura=0; | |
/*public void __set ($nombre, $valor){ | |
switch($nombre){ | |
case "color": | |
if (preg_match("/^#[0-9A-F]{6}$/",$valor)){ | |
} | |
$this->color=$valor; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$variable = 'checking'; | |
$variable = <<<HTML | |
<div class="yui-content" style="overflow-y:auto;height:241px;"> | |
<div class="bodywrapper"> | |
<br/> | |
<br/> | |
<div width="100%" class="wizard"> | |
<div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$variable = 'checking'; | |
$variable = <<<HTML | |
<div class="yui-content" style="overflow-y:auto;height:241px;"> | |
<div class="bodywrapper"> | |
<br/> | |
<br/> | |
<div width="100%" class="wizard"> | |
<div> | |
<center><b>Checking output</b></center> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Page Title</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<div class="container"> | |
<h2>Tema</h2> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
createProfile - | |
for http://embed.plnkr.co/WfE5Vt58d792f8dVXbpM/ | |
*/ | |
$id = 7613; | |
$i = 0; | |
if (isset($_POST['id']) && is_int((int)$_POST['id'])) { | |
$i = (int)$_POST['id']; | |
$id += $i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
Finding an exact match in a text file using PHP AJAX jQuery form | |
http://stackoverflow.com/questions/15121403/finding-an-exact-match-in-a-text-file-using-php-ajax-jquery-form | |
*/ | |
if(isset($_POST["email"])){ | |
$email = $_POST['email']; | |
$emails = <<<emails |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(isset($_POST["email"])){ | |
$email = $_POST['email']; | |
$emails = <<<emails | |
Bobby Brown bobby@somewhere.com | |
Guy Slim guy@somewhere.com | |
Slim Jim slim@somewhere.com | |
emails; | |
if (strpos($email,'@')) { | |
$match = preg_match("/\b{$email}\b/i", $emails ); |