Selamat Datang
blog ini sekedar kumpulan" yang tidak bisa ku ingat seluruhnya,
makanya dibuat dlm tulisan.
produk
Friday, September 26, 2008
Wednesday, September 17, 2008
Monday, September 15, 2008
php spesific your include folder
/*
spesific your include folder
author bageer83@yahoo.co.id
20080913
using for minimalize broken include or include from other places
@$incpath=name your spesific folder
@$file=name file on your spesific folder
map folder
root
includefile
header.php
foother.php
mod
aa.php
incbaru
baru.php
this.php
lain.php
*/
function myInclude($file,$incpath=""){
$incpath="includefile/".$incpath."/";
$true_inc_reff=1;
ini_set("include_path",$incpath);
if(file_exists($incpath.$file)&&(!ereg("http://",$incpath))){
include($file);
}else{
$file=str_replace(".php","",$file);
echo "Sorry \"".$file."\" : not exist"."<br>";
}
$true_inc_reff=0;
}
myInclude("header.php"); /*path of haeder.php : includefile/header.php*/
myInclude("mod/aa.php"); /*path of aa.php : includefile/mod/aa.php*/
myInclude("lain.php","../");/*path of lain.php : lain.php*/
myInclude("baru.php","../incbaru");/*path of lain.php : incbaru/baru.php*/
myInclude($_REQUEST['c'].".php",$_REQUEST['s']); /*?s=mod&c=aa : includefile/mod/aa.php*/
myInclude($_REQUEST['c'].".php",$_REQUEST['s']); /*?s=http://localhost/&c=test will failed*/
myInclude("http://localhost/index.php",""); /*will failed*/
myInclude("index.php","http://localhost/"); /*will failed*/
myInclude("foother.php"); /*path of haeder.php : includefile/header.php*/
#aa.php
/*
first time, checking refferer include
if($true_inc_reff==0){die("failed reff");}
*/
?>
bg83
Friday, September 12, 2008
hitung hari pake pg
function hithari($date){
global $dbconn;
$sql="select TIMESTAMP '$date'-CURRENT_DATE";
$rs=pg_query($dbconn,$sql);
$row=pg_fetch_array($rs);
$d=str_replace("days","",$row[0]);
$d=str_replace("day","",$d);
$d=trim($d);
return $d;
}
pake php langsung gmna ya????
bg83
Thursday, September 11, 2008
rss & atom feeds icon
< link rel = "alternate" type = "application/rss+xml" title = "Prestasikoe - RSS" href = "http://bageer83.blogspot.com/feeds/posts/default?alt=rss" / >
bg83
Tuesday, September 9, 2008
multi_user_ym.reg
[HKEY_CURRENT_USER\Software\Yahoo\pager\Test]
"Plural"=dword:00000001
bg83
Monday, September 8, 2008
SEO for blogspot
<title><data:blog.title/></title>
<b:else/>
<title><data:blog.pageName/>|<data:blog.title/></title>
</b:if>
bg83
Example #1 A htmlentities() example
$str = "A 'quote' is <b>bold</b>" ;
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities ( $str );
// Outputs: A 'quote' is <b>bold</b>
echo htmlentities ( $str , ENT_QUOTES );
?>
from : http://id2.php.net/htmlentities
bg83
Saturday, September 6, 2008
teknik OpenWindow
bg83
teknik cache
Header("Cache-Control: must-revalidate");
$offset = 60 * 60 * 24 * 3;
$ExpireString = "Expires: " . gmdate("D, d M Y H:i:s", time() + $offset) . " GMT";
Header($ExpireString);
?>
bg83
Thursday, September 4, 2008
renew imgVerify
<input name="rgnrt" type="button" id="rgnrt" value="renew" onClick="var s=document.getElementById('imgVerify').src;var re = RegExp(/i=+([\d]*)/i);if(s.match(re)){re=re.exec(s)[0];a=s.split('?')[0];n=(parseFloat(re.split('=')[1])+1);document.getElementById('imgVerify').src=(a+'?i='+n);}else{document.getElementById('imgVerify').src=(s+'?i=1');}">
document.getElementById("imgVerify").src='imgVerify.php';
bg83