Displaying 31-37 of 37 results.
Resolved: PHP "strip_tags" accept all except script
posted by admin on December 25, 2015
I want full allowed tags listRead more
Resolved: PHP add rel nofollow to links string
posted by admin on December 22, 2015
I have content in string, and I want to find all a links and add a rel="nofollow"Read more
Resolved: Convert seconds to Hour:Minute:Second
posted by admin on December 22, 2015
I need to convert seconds to Hour:Minute:Second.

For example: 685 converted to 00:11:25

How can I achieve this?Read more
Resolved: Проблема с кодировкой заголовков в функции mail.ru
posted by admin on December 25, 2015
в письмах почему то не приходят заголовки на русском языке, на английском-приходят

<?php
$mailto = "benderbej@mail.ru";
$charset = "utf-8";
$subject = "Обратная связь";
$content = "text/plain";
$status = " ";

$errors_name = 'введите ваше имя';
$errors_mailfrom = 'введите свой E-mail';
$errors_incorrect = 'заполните правильно Ваш E-mail';
$errors_message = 'наберите сообщение';
$send = 'ваше письмо отправлено!';

if (isset($name) && $name == "")
{
$status = "$errors_name";
}
elseif (isset($mailfrom) && $mailfrom == "")
{
$status = "errors_mailfrom";
}
elseif(isset($mailfrom) && !eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$",$mailfrom))
//elseif(isset($mailfrom) && !preg_match("/^([a-z,._,0-9])+@([a-z,._,0-9])+(.(
//[a-z])+)+$/",$mailfrom))
{
$status = "$errors_incorrect";
unset($mailfrom);
}
elseif (isset($message) && $message == "")
{
$status = "errors_message";
}
elseif (!empty($_POST))
{
$subject = substr(htmlspecialchars(trim($_POST['subject'])), 0, 1000);
$message = substr(htmlspecialchars(trim($_POST['message'])), 0, 1000000);
$name = substr(htmlspecialchars(trim($_POST['name'])), 0, 30);
$headers = "MIME-Version: 1.0\r\n";
$headers .="Content-Type: $content charset=$charset\r\n";
$headers .= "Date: ".date("Y-m-d (H:i:s)",time())."\r\n";
$headers .= "From: \"$name\"<$mailfrom>\r\n";
$headers .= "X-Mailer: My Send E-mail\r\n";
mail("$mailto","$subject","$message","$headers");
unset($name, $mailfrom, $mailto, $subject, $message);
$status = "$send";
}

в чем дело?
пробовал менять на

$charset = "Windows-1251";
Read more
Resolved: How to get URL of current page in PHP
posted by admin on December 25, 2015
How to get URL of current page in PHP?Read more
Resolved: Русский текст в транслит на PHP(Rus to Lat)
posted by admin on December 25, 2015
The last segment is actually the friendly title of the blog article. The problem is when I try to pass that segment to the database, the cyrillic fonts turn into something like %D1%8A%D0%B4%D1%80%D0%BE%D1%81%D1%8 and couldn't match the database record. In the address bar in my browser it looks normal (мъдростта-на-вековете) but if I choose 'copy url location' the last segment again turns into these strange characters.

Please help to convert cyrillic to english letters(lat)Read more
Resolved: PHP replace php start and end tags to lt gt
posted by admin on December 22, 2015
I want to replace <?php and ?> symbols to lt gt html special charectersRead more