<?php
class ClassName
{
function __construct($text)
{
return "sometext $text";
}
function __toString()
{
return 'Чертовы извращенцы.';
}
}
echo new ClassName('new text');
preg_match_all('/\p{Cyrillic}+/u', $str, $m);
preg_match_all('/\p{Han}+/u', $str, $m);
if (empty($this->request->post['catapulta_firstname2'])) {
$firstname2 = 'Не указано';
} else {
$firstname2 = $this->request->post['catapulta_firstname2'];
}
<td><a href='#' id="delete-link" data-id="{$dbGetUsersResult['id']}">X</a></td>
<?php
session_start();
function file_get_contents_curl($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
return curl_exec($ch);
}
$txResult = file_get_contents_curl($url); // тут должна быть ваша ссылка на ваш внешний веб-сервис для проверки
if ($txResult == 1) {
header("Location: http://server.com/preauth.php"); /* добавить POST (username+pass) */
exit;
} elseif ($txResult == 0) {
echo "Wrong usename or password!";
}
?>