Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Papular Wap Scripts 4 Your Sites, collection of WAP scripts
gaggu007
post Jul 11 2006, 03:28 PM
Post #1


Newbie [Level 1]
*

Group: Members
Posts: 21
Joined: 11-May 06
Member No.: 23,439



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

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>


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


This post has been edited by BuffaloHELP: Jul 12 2006, 05:07 AM
Go to the top of the page
 
+Quote Post
wappy
post Jul 12 2006, 11:25 AM
Post #2


Premium Member
********

Group: Members
Posts: 164
Joined: 2-July 06
From: England
Member No.: 25,974



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 :-)
Go to the top of the page
 
+Quote Post
masterleous
post Jul 18 2006, 10:18 AM
Post #3


Advanced Member
*******

Group: Members
Posts: 108
Joined: 9-July 06
Member No.: 26,360



Very nice scripts you have shared with us. I want to know more about webbuddy Script you have entered here.
Go to the top of the page
 
+Quote Post
gaggu121
post Jul 18 2006, 10:30 AM
Post #4


Newbie [Level 2]
**

Group: Members
Posts: 28
Joined: 13-July 06
From: INDIA *PUNJAB*
Member No.: 26,539



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.....
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How To Download Any Flv Files From Any Sites(6)
  2. Xampp How Can I Generate "automatic Start Sites"(6)
  3. Which Proxy Sites Can Be Used To Access The Websites?(30)
  4. Free Php Scripts(1)
  5. Other Free Hosting Sites(40)
  6. Question About Framed Sites...(4)
  7. Photoshop, Flash And Fireworks Tutorial Site Links(2)
  8. When Trap17 Will Host Non-english Sites?(6)
  9. Free Sms Site(5)
  10. Confessions Of Insanity(2)
  11. Make Money From Clicking(49)
  12. Cheap Domain Collection(9)
  13. Some Php Good Scripts(6)
  14. Php Scripts And Website Templates(7)
  15. Musicovery.com(0)
  1. Full Web Building Tutorials(3)
  2. Ptc Sites (pay To Click)(0)
  3. The Best And Free Website/html Editors + Text Editors(48)
  4. Money From Digg?!(2)
  5. Please Can You Review My Blog(3)
  6. Hackers Hijack A Half-million Sites: Phpbb Forum Users Must Read(8)
  7. Three Neat Avatar-based Sites(7)
  8. 10.000's Of Icons, Excellent Collection!(14)
  9. Recommended List Of Money Making Sites(0)
  10. Sonic And Mega Collection Plus(4)
  11. Snard's Scripts Free(4)
  12. Blogging Sites Going To Be Banned In India ?(16)
  13. Freelance Sites(5)
  14. Check Referrer To Prevent Linking Yours From Other Sites(8)
  15. Awesome Free Games Sites(16)


 



- Lo-Fi Version Time is now: 8th September 2008 - 06:20 PM