gostovanje, domene, spletne strani, izdelava spletnih strani, optimizacija, spletno gostovanje

How to send correct UTF-8 mail in PHP

March 18th, 2010
function mail_utf8($to, $subject = '(No subject)', $message = '', $header = '') {
  $header_ = 'MIME-Version: 1.0' . "\r\n" . 'Content-type: text/plain; charset=UTF-8' . "\r\n";
  mail($to, '=?UTF-8?B?'.base64_encode($subject).'?=', $message, $header_ . $header);
}

Inxs Beautiful Girl

March 16th, 2010

Billy’s private parking – neon

March 15th, 2010

Los Ventilos – Ne gledam nazaj

March 15th, 2010

stristr – Searching inside a text string

March 3rd, 2010
$main_string="This is a test string <a href=http://www.plus2net.com>with a link</a> to plus2net";
if(stristr($main_string,"http://")){
echo "String contains a link or the text http:// inside it ";}
else {
echo "String does not contains a link or the text http:// inside it ";}

OpenVPN on Centos wint windows

March 1st, 2010
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
iptables -A FORWARD -i tun0 -s 10.8.0.0/24 -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o tun0 -m state –state ESTABLISHED,RELATED -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

String dd-mm-yyyy convert to date yyyy-mm-dd

February 27th, 2010
<?php

$date = "25-12-2010";//[something in US format: mm-dd-yy]
$newdate = substr($date,6,4) . "-" . substr($date,3,2) . "-" . substr($date,0,2);

print "\n=====\n".$newdate."\n===============\n";

?>

strrev – reversed string

February 27th, 2010
<?php
echo strrev("Hello world!"); // outputs "!dlrow olleH"
?>

Darren Styles & Manian – Outta my head (Manian Video Mix)

February 27th, 2010

Search and replace within a field with regex in MySQL

February 24th, 2010
SELECT * FROM 'table' WHERE `name` REGEXP '\r'
UPDATE 'table' SET 'field' = REPLACE(FIELD,"findvalue", "reaplcevalue") WHERE REGEXP 'regexp search expression'


Opera web browser - download si.blogs page counter Firefox 3 Blogres.si [Valid RSS]
Valid CSS! Valid XHTML 1.0 StrictBloger.si
Drugi svet - slovenski blogerski casopis www.mojavizitka.com - spletna vizitka
Spletno Mesto, gostovanje, domene, optimizacija, izdelava spletnih strani
Spletno Gostovanje
Add to Google
Technorati Profile