|
|
Papular Wap Scripts 4 Your Sites - collection of WAP scripts | ||
Discussion by gaggu007 with 3 Replies.
Last Update: July 18, 2006, 3:30 am | |||
![]() |
|
|
CODE
<?$htmlredirect = "http://kralj.frih.net";
$wmlredirect = "http://kralj.r8.org";
if(strpos(strtoupper($HTTP_ACCEPT),"VND.WAP.WML") > 0){
header("Location: ".$wmlredirect);}
else{
header("Location: ".$htmlredirect);
exit;}
?>
==================================================================
Graphic counter.
!!! Dont forget to create count.txt file and cmod 777
if your server does not support Gif image create, use png image create.
Replace
header('Content-Type: image/GIF');
ImageGIF ($im);
with
header('Content-Type: image/PNG');
ImagePNG ($im);
thats all
CODE
<?// Image Counter Script
if(!file_exists("count.txt"))
{$counter=fopen("count.txt", "a");}
else
{$counter=fopen("count.txt", "r+");}
$aufruf=fgets($counter,100);
$aufruf=$aufruf+1;
rewind($counter);
fputs($counter,$aufruf);
fclose($counter);
$im = @ImageCreate (99, 46) //change the image size here
or die ("Kann keinen neuen GD-Bild-Stream erzeugen");
$background_color = ImageColorAllocate ($im, 255, 255, 255);
$text_color = ImageColorAllocate ($im, 255, 0, 0);
ImageString ($im, 2, 1, 1, "$aufruf", $text_color2);
header('Content-Type: image/GIF');
ImageGIF ($im);
?>
==========================================================
easy total hits ,put it on page where want to count hits
CODE
$counter_array = file("counter.dat");$all = $counter_array[0]+1;
$fp = @fopen("counter.dat","wb");
@fputs($fp,$all);
@fclose($fp);
echo '<br/><small>Total hits: <u>'.$all.'</u></small><br/>';
=========================================================
Here is countdown script:
CODE
<?$day = 1;
$month = 1;
$year = 2006;
$end = mktime(0,0,0,$month,$day,$year);
$today= mktime(date("G"),date("i"),
date("s"),date("m"),date("d"),date("Y"));
$days=($end-$today)/86400;
if ($days>0) {
$r1 = explode('.',$days);
$hours=24*($days-$r1[0]);
$r2 = explode('.',$hours);
$minutes=60*($hours-$r2[0]);
$r3 = explode('.',$minutes);
$seconds=60*($minutes-$r3[0]);
$r4 = explode('.',$seconds);
echo 'Days left: ' .$r1[0];
echo '<br>Time left: ' . $r2[0] . ':' . $r3[0] . ':' . $r4[0];
} else {
echo "Happy new year:)";}
?>
===================================================================
WapBuddy File dir script.
CODE
<?$conf["items_per_page"] = 20;
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\""." \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
if (!isset($page)) {$page = 0;}
$total = 0;
if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array();
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file != "index.php")
{
$file_array[] = $file;
}
}
$file_count = count ($file_array);
sort ($file_array);
?>
<wml>
<card id="card1" title="">
<p mode="nowrap">
<do type="option" label="Home"><go href="/index.php"/></do>
<? echo "<a href=\"/best.php\">*Best STUFF*</a><br/><a href=\"/index.php\">•Home•</a><br/><br/>"; ?>
<?
if ($file_count > 0)
{
$first_record = $page * $conf["items_per_page"];
$last_record = $first_record + $conf["items_per_page"];
while (list($fileIndexValue, $file_name) = each ($file_array))
{
if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
{
echo "<a href=\"$file_name\">$file_name</a> (". round(filesize($file_name)/1024,1) . "kb)<br/>";
$total = $total + filesize($file_name);
}
}
if (($file_count > 0) AND ($page != 0))
{
// previous button
$prev_page = $page -1;
echo "<br/><a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page\">Prev</a><br/>";
}
if (($file_count > 0) AND ($last_record < $file_count))
{
// next button
$next_page = $page + 1;
echo "<br/><a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page\">Next</a><br/>";
}
echo "<br/>Directory:<br/>$file_count ";
if ($file_count == 1)
{echo "file";}
else
{echo "files";}
echo " (" . round($total/1024,1) . "kb)";
echo "<br/><a href=\"/index.php\">•Home•</a>";
echo "<br/><a href=\"/downloads.php\">«Downloads</a>";
echo "<br/><a href=\"page.php\">Pages</a>";
}
closedir($dp);
?>
</p>
</card>
</wml>
[note=BuffaloHELP]In accordance with Trap17 forum rules, you must use proper English words and refrain from using slangs, such as "ur" instead of "your".[/note]
Thank You !
Have a nice day to all my new friends.....
Similar Topics:
Releasing Wap/php Scripts?
Make Money From Wap Sites
Full Web Building Tutorials
A Wap Php Script. (7)
|
(4) Trouble With Php
|
Loading...
HOME 





YouTube Answers: YouTube Worldwide
PPStream - Watch Free Streaming Movies Part 1 - Ubuntu 9.10
Building Mobile Friendly Websites - Ankit Gupta - Google India SearchMasters '09

