Monday, March 22, 2010

Hide iframe border on IE

<html>
<head>
<body bgcolor="#000000">
</head>
<iframe src="./index.html" frameborder="0" border="0" cellspacing="0" width="100%" marginwidth="0" marginheight="0" height="75%">
</iframe>
<br><br>
<iframe src="./ads.html" noresize="noresize" frameborder="0" border="0" cellspacing="0" scrolling="no" width="100%" marginwidth="0" marginheight="0" height="25%">
</iframe>
</body>
</html>

Thursday, March 18, 2010

jQuery Manual/documentation

jQuery Manual/documentation 1.4 version in .chm format for download
This is jQuery script manual that I found over the internet. I share and you will be able to develop your web with jQuery that contain jQuery API and documentation . Click the jQuery logo to download.






Thanks to http://charupload.wordpress.com and http://jquery.com/

What is jQuery used for




jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.

You may use jQuery under the terms of either the MIT License or the Gnu General Public License (GPL) Version 2.

embedding jquery-1.4.2.min.js or jquery-1.4.2.js or both of them into your code, you can manipulate or using futures of jQuery. You do not need to write a thousand line of javascript code but just include js file into your code. You can used the futures such as CSS,Effect,Ajax,manipulation, and others greatest java

How to get started?? just visit http://docs.jquery.com/Main_Page.

Click HERE to download jquery manual documentation

Wednesday, March 17, 2010

CSS style like print preview / paper view

Need to preview like print preview? use this css style example.


<html>
<head>
<title>Contoh Kandungan</title>

<style type="text/css">
body {
background-color: #9099ae;
}
.textclass {

background-color: #fff;
margin: 0 auto;
border:1px solid #000;
border-right-width: 3px;
border-bottom-width:3px;
padding: 5em 6em;
font-family: Arial;
}

</style>

</head>
<body>
<p class="textclass">
Welcome to thegreatestpost.blogspot.com
<br>
Insert your content here.
</p>
</body>
</html>


sample:





Friday, March 12, 2010

Create CHM file / Help file

Usually manual or help file are created in .pdf (Portable Document Format) format or .chm (Microsoft Compiled HTML Help files) format. If it's compared both of them, chm format more user friendly but it's just for windows.

There are many software to create chm file and one of them is Abee Chm Maker by AbeeTech, http://abeetech.com/

It's free software and you can download it at http://abeetech.com/






visit abeetech

Monday, March 1, 2010

Send SMS function using PHP

What are usually need to make a sms;



This is a simple function to send sms using php script.


<?php

function PostToHostSMS($host, $port, $username, $password, $data_to_send)
{
$dc = 0;
$bo ="--------453534534534536";

$fp = fsockopen($host, $port, $errno, $errstr);
if (!$fp) {
echo "errno: $errno \n";
echo "errstr: $errstr\n";
return $result;
}

fputs
($fp, "POST / HTTP/1.1\r\n");
if ($username != "") {
$auth = $username . ":" . $password;
echo "auth: $auth\n";
$auth = base64_encode($auth);
echo "auth: $auth\n";
fwrite
($fp, "Authorization: Basic " . $auth . "\r\n");
}
fputs
($fp, "User-Agent: NowSMS PHP Script\r\n");
fputs
($fp, "Accept: */*\r\n");
fputs
($fp, "Content-type: multipart/form-data; boundary=$bo\r\n");

foreach($data_to_send as $key=>$val) {
$ds =sprintf("%s\r\nContent-Disposition: form-data;
name=\"%s\"\r\n%s\r\n"
,$bo,$key,$val);
$dc += strlen($ds);

}
$dc += strlen($bo)+3;
fputs
($fp, "Content-length: $dc\r\n");
fputs
($fp, "\r\n");
fputs
($fp, "This is a MIME message\r\n\r\n");

foreach($data_to_send as $key=>$val) {
$ds =sprintf("%s\r\nContent-Disposition: form-data;
name=\"%s\"\r\n%s\r\n"
,$bo,$key,$val);
fputs
($fp, $ds );
}
$ds = $bo."--\r\n" ;
fputs
($fp, $ds);

$res = "";

while(!feof($fp)) {
$res .= fread($fp,1);
}
fclose
($fp);


return $res;
}

?>


Create xml rss feed with PHP

First, write a script like below;

<?php header('Content-type: text/xml'); ?>

<?php $phpver = phpversion(); ?>

<rss version="2.0">
<channel>
<title>SapuraTIE</title>
<description>Sapuratie</description>
<language>en-US</language>
<link>http://thegreatestpost.blogspot.com/</link>
<copyright>Your copyright</copyright>
<generator>
XML/RSS feed generator by thegreatestpost(PHP version
<?php echo $phpver; ?>)
</generator>

<managingEditor>Site Editor</managingEditor>
<webMaster>Webmaster Email</webMaster>



<?php
require_once('db_connect.php'); //your connection to database

$query = "SELECT id,content_title,content_data,content_date,
content_page FROM sapurastie_article
WHERE content_section <> 10 AND
content_language =
$lang ORDER BY content_date DESC LIMIT 0,15"; //your query
$execute = mysql_query($query) or die(mysql_error());

while($result = mysql_fetch_array($execute)) {
?>
//Start create item
<item>
<title> <?=htmlentities(strip_tags($result['content_title'])); ?></title>
<description>
<?=htmlentities(strip_tags(substr($result['content_data'],0,500)."...",'ENT_QUOTES'));
?>

</description>

<pubDate>
<?php
echo date('r', strtotime($result['content_date'])); ?>
</pubDate>
<guid>http://thegreatestpost.blogspot.com</guid>
</item>
<?php } ?>

</channel>
</rss>

then, the output will be like;



Created by: thegreatestpost.