Jump to content
xisto Community
Sign in to follow this  
gaggu007

Papular Wap Scripts 4 Your Sites collection of WAP scripts

Recommended Posts

Redirect script webbrowser from wap to web and wapbrowser from web to wap.

<?$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

<?// Image Counter Scriptif(!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 hereor 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

$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:

<?$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.


<?$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://forums.xisto.com/no_longer_exists/ (!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>

Notice from BuffaloHELP:
In accordance with Xisto forum rules, you must use proper English words and refrain from using slangs, such as "ur" instead of "your".

Edited by BuffaloHELP (see edit history)

Share this post


Link to post
Share on other sites

Hey very nice. I love the count down script! An you know wapbuddy was one of the first scripts i ever used on my site. I infact still use a bit of his code in the updated version on my site, but i have added search, jump to page boxes, ext detection and matching icons.. Info when you click on a file also images displayed when you click on a file if they are under 10kb, i plan to add number of file views and a send to email option later. Nice :-)

Share this post


Link to post
Share on other sites

hi my dear friend masterleous what u need help in wapbuddy script.i know only about wap scrits bkos i ever wrote wap scripts nt web scripts if u need any web script please pm me or email me at gaggu121@yahoo.com.i ll wait ur replay ever.hope u ll like my writen scripts..Thank You !Have a nice day to all my new friends.....

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.