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 sendEmail($fromEmail,$fromEmailName,$toEmail,$toEmailName,$subject,$message,$extra='') { | |
$headers = 'MIME-Version: 1.0' . "\r\n"; | |
$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n"; | |
$headers .= 'To: '.$toEmailName.' <'.$toEmail.'>' . "\r\n"; | |
$headers .= 'From: '.$fromEmailName.' <'.$fromEmail.'>' . "\r\n"; | |
if(wp_mail($toEmail,$subject,$message,$headers)) { | |
}else { |
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 | |
$movies = new SimpleXMLElement(file_get_contents('http://www.cbr.ru/scripts/XML_daily.asp?date_req=03/12/2018')); | |
function get_xml_from_url($url){ | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
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'); |
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(!is_admin()){ | |
add_action('print_footer_scripts', 'print_script_addsdgsdgsd', 99); | |
} | |
function print_script_addsdgsdgsd() | |
{ | |
if( !empty($_COOKIE['geo'])){ |
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 | |
$int_value = ctype_digit($value) ? intval($value) : null; | |
if ($int_value === null) | |
{ | |
echo 'null'; | |
}else{ | |
echo 'NUMBER'; | |
} | |
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 | |
public function __construct() | |
{ | |
add_action('print_footer_scripts', array($this,'print_script_addsdgsdgsd'), 99); | |
} | |
public function print_script_addsdgsdgsd() | |
{ | |
if( !empty($this->elements)){ |
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 | |
public function RecurseXML2($xml = '') | |
{ | |
function RecurseXML($xml, &$vals, $parent = "") | |
{ | |
$childs = 0; | |
$child_count = -1; # Not realy needed. | |
$arr = array(); |
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 | |
// $code = 11; | |
// $department = 2; | |
// $subdivision = 3; | |
// $address =4; | |
// $title =5 ; | |
// $full_title = 6; | |
// $short_title =7 ; |
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
<h1>Countdown Clock</h1> | |
<div id="clockdiv"> | |
<div> | |
<span class="days"></span> | |
<div class="smalltext">Days</div> | |
</div> | |
<div> | |
<span class="hours"></span> | |
<div class="smalltext">Hours</div> | |
</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
<input type="hidden" name="redirect_to" value="<?php echo esc_url($redirect_to); ?>"> | |
<?php | |
update_user_meta($current_user->ID, '_psyho_date', sanitize_text_field($form->date)); |