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(rand(0,100)<30){ // 30% du temps le rss est stoppé, pour ne pas dépasser la limite quotidienne de 25 | |
//exit(); | |
} | |
$heure = intval(date("G")); | |
if(in_array($heure,[3,4,5,6,7,8,10,13,15,19])){ // la liste des horaires où le rss fournit des tweets à poster | |
//exit(); | |
} | |
header('Content-Type: application/xml; charset=utf-8'); | |
date_default_timezone_set('Europe/Paris'); |
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 | |
$embed = ""; | |
$thumb = ""; | |
$url = $resource->video; | |
if (strpos($url, 'youtube') > 0) | |
{ | |
$embed = 'https://www.youtube.com/embed/'; | |
// Now get the 'v=' value & stick on the end | |
preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $matches); | |
$v = $matches[1]; |
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 PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
<html> | |
<head> | |
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=iso-8859-2"> | |
<meta charset="utf-8"> | |
<title> | |
Norwid | |
</title> | |
<link rel="stylesheet" href="//releases.flowplayer.org/7.2.4/skin/skin.css"> | |
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script> |
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 | |
function productfeatureorder($order) | |
{ | |
// mysqli_real_connect | |
// Create connection | |
$url = $_SERVER['HTTP_HOST']; | |
if ($url == 'belchim.avalonbloom.com') { | |
//$conn (<<objectname)= mysqli_connect('url:string', 'User:string', 'database:string', 'port(not required if default):string', Socket(not required if default):string), ; | |
$conn = mysqli_connect('localhost', 'belchim', 'belchim', 'belchim'); |
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 | |
function productfeatureorder($order) | |
{ | |
// mysqli_real_connect | |
// Create connection | |
$url = $_SERVER['HTTP_HOST']; | |
if ($url == 'belchim.avalonbloom.com') { | |
//$conn (<<objectname)= mysqli_connect('url:string', 'User:string', 'database:string', 'port(not required if default):string', Socket(not required if default):string), ; | |
$conn = mysqli_connect('localhost', 'belchim', 'belchim', 'belchim'); |
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 | |
echo 'test'; | |
?> |
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 | |
$url = "http://admin.lifetimesms.com/plain"; | |
$parameters = array("api_token" => "Your API token", | |
"api_secret" => "Your API secret", | |
"to" => "92xxxxxxxxxx", | |
"from" => "Brand", | |
"type" => "unicode", | |
"message" => "لائف ٹائم ایس ایم ایس" |
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
What day is today?: | |
<form method="post" action=""> | |
<input type="text" name="value"> | |
<input type="submit"> | |
</form> | |
<?php | |
if (isset($_POST['value'])) { |
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 | |
$text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. <code>Donec sed erat</code> vel diam ultricies commodo. | |
Nunc venenatis tellus eu quam suscipit quis fermentum <code>dolor vehicula.</code> fin"; | |
$regex=''; | |
$regex = '#<\s*?code\b[^>]*>(.*?)</code\b[^>]*>#s'; | |
$code = preg_match_all($regex, $text, $matches); | |
echo $text."<hr>"; | |
echo var_export($matches,true); | |
?> |
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 | |
$redirect_uri = 'http://localhost/myapp/'; | |
$client_id = 'f9d70f3f-08c1-4df3-9f9a-f3ce24b572a3'; | |
$client_secret = 'XzB@RgTO3CYUO80Si-8gdlD@g[4]IW[c'; | |
$auth_code = $_GET['code']; | |
$scope="https://graph.microsoft.com/Contacts.ReadWrite"; | |
$fields=array( | |
'code'=> urlencode($auth_code), | |
'client_id'=> urlencode($client_id), | |
'client_secret'=> urlencode($client_secret), |