-
Content Count
165 -
Joined
-
Last visited
Everything posted by wappy
-
But i don't want to search google? I use this site and post my code snippets here, also i know for a fact someone here can help me with this.. What is the use in searching google when we can build a nice database of code and php help here? If i find the code before anyone replys with it i will post it here anyhow as it may be usefull to other users here.
-
No you are correct there were two errors. Here is a corrected update. I will work on it more later :-) --- Oops i made errors again so i have definatly fixed this time and here is the code im using on my own site. You must in your root create a folder called "counters" and inside this counters folder put files online.txt, wappyCOUNT.txt, and counter.dat. You must set permissions on ALL the files in the counters folder to chmod 0777 ok. Then on your index page copy and paste this code where you would like the counters displayed. //online counter$tim = 120+time(); $time = time(); $f = "counters/online.txt"; $nusk = file($f); $sk = count($nusk); $in = $HTTP_USER_AGENT.$REMOTE_ADDR; $fp = fopen($f, "w+"); for($i=0; $i<$sk; $i++) { list($nix, $timf) = explode("|", $nusk[$i]); if($nix !== $in && $timf>$time) { fwrite($fp,$nusk[$i]); }} fwrite($fp, "$in|$tim|\n"); fclose($fp); $xfile=file('counters/online.txt');$onlinecount=count($xfile);echo "-Online: $onlinecount+<br/>";//(c)wappyCOUNT$fn = "counters/wappyCOUNT.txt"; $fp = fopen($fn, "a+"); $fs = filesize($fn); $tdy = date("d/m/y"); if ($fs==0) { $co = 1;$open = 0; fwrite($fp, $tdy."-".$co."-".$open); }else{ $info = fread($fp, $fs); $cdata = explode("-", $info); ftruncate($fp, 0); if($tdy==$cdata[0]) { $co = $cdata[1]+1;$open = $cdata[2]; fwrite($fp, $tdy."-".$co."-".$open); }else{$co = 1;$open = $cdata[2]+1; fwrite($fp, $tdy."-".$co."-".$open); } } fclose($fp); echo "-Daily hits: $co<br/>";echo "-Days open: $open<br/>";//total hits$counter_array = file("counters/counter.dat");$total = $counter_array[0]+1;$fp = fopen("counters/counter.dat","wb");fputs($fp,$total);fclose($fp);echo "-Total hits: $total<br/>";//average daily hits$average = $total/$open;$average = round ($average);echo "-Daily average: $average<br/>";//average hourly hits$averagehour = $average/24;$averagehour = round ($averagehour);echo "-Hourly average: $averagehour<br/>";//average week hits$averageweek = $average*7;$averageweek = round ($averageweek);echo "-Weekly est: $averageweek+<br/>";//est month hits$averagemonth = $average*29.5;$averagemonth = round ($averagemonth);echo "-Monthly est: $averagemonth+<br/>";//average year hits$estyear = $average*356;$estyear = round ($estyear);echo "-Yearly est: $estyear+<br/>";i apologise again for the errors on my previous counter snippets but i did use and get the errors on my own site also. Well its fixed for sure now, if anyone can update this further please do so and post your code here :-)
-
Hi i want to create an install file for one of my scripts, the above code looks great but can someone repost with the connection code included in it also? Im really not very familiar with sql as most of the scripts i have created are using flatfile db but i have a very nice wap top list script an i must make a nice install for it ;-) thanks in advancePlease can anyone repost the install file code with mysql connection code included? Sorry its confusing me =[
-
Php Scripts Free For Every One list of the best php scripts sites
wappy replied to adly3000's topic in Programming
Why do you keep posting silly things? (to post above) of course you must download the scripts... -
Dj will you stop follow me around wap/web with your sly comments! You uploaded ONLY THE DAILY HITS to my old site to share ok, so i also did SHARE IT! An i doubt you wrote is as you code like a monkey (with no hands or keyboard pmpl) ;-) --- ok i have an update for the counters, i left the online out as it confuses me pmpl, but this new one runs off only one text file (so create file wappyCOUNT.txt) and CHMOD 0777, it will display for you... +daily hits +hits yesterday +days open +months open +years open +total hits +average daily hits //(c)wappyCOUNT$fn = "wappyCOUNT.txt"; $fp = fopen($fn, "a+"); $fs = filesize($fn); $tdy = date("d/m/y"); if ($fs==0) { $co = 1;$yesterday = 0;$open = 0;$total = 1; fwrite($fp, $tdy."-".$co."-".$yesterday."-".$open."-".$total); }else{ $info = fread($fp, $fs); $cdata = explode("-", $info); ftruncate($fp, 0); if($tdy==$cdata[0]) { $co = $cdata[1]+1;$yesterday = $cdata[2];$open = $cdata[3];$total = $cdata[4]+1; fwrite($fp, $tdy."-".$co."-".$yesterday."-".$open."-".$total); }else{$yesterday = $co;$open = $cdata[3]+1; $co = 1; fwrite($fp, $tdy."-".$co."-".$yesterday."-".$open."-".$total); } } fclose($fp); echo "-Daily hits: $co<br/>";echo "-Yesterday: $yesterday<br/>";echo "-Days open: $open<br/>";//months open$months = $open/29.6666667;$months = round ($months, 1);echo "-Months open: $months<br/>";//years open pmpl$years = $open/356;$years = round ($years, 2);echo "-Years open: $years<br/>";//total hitsecho "-Total hits: $total<br/>";//average daily hits$average = $total/$open;$average = round ($average);echo "-Average daily: $average<br/>";if is any errors with this please forgive me im a little drunk pmpl
-
Can anyone show me example code of how to install a database table instead of me having to upload an file with it in, so i can do it from a php page? Thanks in advance ;-)
-
String Search Outside My Site? Help me work this out please ;-)
wappy replied to wappy's topic in Programming
I build WAP sites not WEB. I need the code to build a new link exchange system but must be able to check a link is present from a page ;-) -
Say i have a file file.txt... Can someone give me an example of how to delete a string from this file ie..The file contains:wappy::sucks::at::php--- i want to delete sucks::
-
Php Scripts Free For Every One list of the best php scripts sites
wappy replied to adly3000's topic in Programming
I have little interest in web scripts apart from mod's for my forum so https://mybb.com/ i do however has a massive interest in WAP SCRIPTS.. I have a large collection on my site http://forums.xisto.com/no_longer_exists/ but you will need to visit with a wap compatible browser or it will redirect you to my web forums if you use Internet Explorer ;-) -
Please list here any link exchanges or ranking sites that accept your web and wap url? For example: my main site is a wap site but i also have a web version (myBB Forums), i have found two sites like this already, where you register and users have a choice to go to your wap OR web site. The advantage of this is that i can link to them on BOTH my web AND wap sites, in theory sending them twice as many hits, and in return getting twice as many back ;-) the two sites i have found are: http://mradar.com/mr/w/index0.asp?i= <--- only apply if you get alot of traffic as they have rules about how much traffic you send, but if you can keep up with it, the return is much worth it... This will prob sound bad but use a porn style name for your link title as most other sites registered here seem to have done this pork.... http://surfwap.com/ now this is my favourite of the two! Owned by the biggest company on wap twilightwap.com and they send many hits.. For example i have just been accepted... I sent them seven hits.. In return i have recieved 200 back so far lol ;-) o yeah baby ;-)
-
I just installed phpbb an agree it is good.. I wanna look now make sure i made the right choice with mybb (still think i have). What about punbb? That don't look to bad.
-
Wap Redirection Usefull code that all wap site owners should use
wappy replied to wappy's topic in Programming
Well dj they will have a bit of a problem if using IE as it don't read wap pages which is why i use the code above to redirect them to my WEB site so i DON'T lose traffic...----btw can anyone tell me the id's of other web browsers that don't support wap browsing..?? Like Internet Explorer's id is simply IE. Would be helpfull if someone could list them for me as i don't often work from pc and am ant familiar with the browsers ;-) -
I had never installed a web site till early hours of this morning (i build wap/mobile) sites.My choice was myBB and im very impressed. A member here recommended it as i posted asking for one with similar layout etc to this forum.Its perfect for me! I also added a shoutbox, image resizer, public ban notice, welcome message and i think every interesting mod i could find pmpl, it was extremly simple to install and also were the mod's! I spent more time playing with the options than installing (took me half hour uploading from a cell phone) ;-)
-
Dj.dance how much do you want for the complete script?? Now don't be mean just cos we argued the other day on wap forum ;-)
-
Hotlinking Protection? A little help please ;-)
wappy replied to wappy's topic in Web Hosting Support
Ok i think i understand now. Say i have no sub domains just my site.com... In the url box i should put https://www.salesforce.com/products/platform/overview/ and site.com or do i need to in include also my folders like my site.com/forum and site.com/chat ?? Thanks for your help ;-) -
Very nice, i like the extra times but think its a little clutted on smaller phones ;-)
-
Mmm how strange you follow me here. No i don't mean like copyright. I heard there is a way you can encrypt pages without it affecting the php.. I don't know if this is true which is why im asking. As if i can find a nice way to do it i will release every wap script i create untill it gets cracked ;-)
-
Page Loading Time V2 how long does your page take to load?
wappy replied to cragllo's topic in Programming
Ah so the original one is not accurate? I put it on my wap site but use explode to get rid of the E. I had a feeling the start needed to be at the top of code and vice versa lol. Ah well it still looks cool untill i use the new code. Im sure on php.net i read a way to shorten strings.. I will look again at some point as for my tiny wap site the number seems very long, i would have maybe just like 1.65824 ;-) -
Hi, thanks for the account btw its great! I have already installed a wap site with chat etc, and some myBB forums and mod's!Anyway to my point:im a little confused with the hotlinking protection menu...Above the box it explains that any ext's in the box will be blocked... And any not will be allowed...However right above the input box it says ALLOW?Sorry if im being dumb but shall i put ext's i want to block or allow in the box??Just i wanna set it before i upload any thing as other sites have habit of linking to my stuff.. Grrr lol.Thanks in advance ;-)
-
Wap Redirection Usefull code that all wap site owners should use
wappy posted a topic in Programming
Use this code to redirect pc users from your wap site to web site: include above page header this code: <?php$mywebsite = "forum/index.php";$browser = explode ('/', $HTTP_USER_AGENT);if($browser[0]=="IE"){header ('Location: $mywebsite');}?> -
I have created two great scripts one a wap download/ftp-upload script, the other a wapCHAT. How can i stop them removing my copyright?
-
Page Loading Time how long does your page take to load?
wappy replied to cragllo's topic in Programming
Ah great! I have been looking for this code for ages! I didn't understand a previous example i read. I will use this on my site ;-) -
Anyone Have Tried Wireless Internet ?
wappy replied to RemoteConnection's topic in Computer Networks
I don't know weather this counts as wireless internet and i apologise if im off topic, but im browsing and replying to this with a phone lol (nokia n-gage qd) with a mobile version of opera. I also have ftp software and text editor etc for my phone and build full sites with it! Mainly wap sites but yesterday i did install web forums with extra mod's installed also. Its extremly slow and hard to navigate web sites with this method but it my only option right now ;-) -
First create a dir "counters" in root add to it dailyhits.txt, hits.txt, online.txt an CHMOD 0777, place this on index: //online counter$tim = 120+time(); $time = time(); $f = "counters/online.txt"; $nusk = file($f); $sk = count($nusk); $in = $HTTP_USER_AGENT.$REMOTE_ADDR; $fp = fopen($f, "w+"); for($i=0; $i<$sk; $i++) { list($nix, $timf) = explode("|", $nusk[$i]); if($nix !== $in && $timf>$time) { fwrite($fp,$nusk[$i]); }} fwrite($fp, "$in|$tim|\n"); fclose($fp); $xfile=file('counters/online.txt');$onlinecount=count($xfile);echo "-Online: $onlinecount<br/>";//day hits counter$fn = "counters/dayhits.txt"; $fp = fopen($fn, "a+"); $fs = filesize($fn); $tdy = date("d/m/y"); if ($fs==0) { $co = 1; fwrite($fp, $tdy."-".$co); }else{ $info = fread($fp, $fs); $cdata = explode("-", $info); ftruncate($fp, 0); if($tdy==$cdata[0]) { $co = $cdata[1]+1; fwrite($fp, $tdy."-".$co); }else{ $co = 1; fwrite($fp, $tdy."-".$co); } } fclose($fp); echo "-Daily hits: $co<br/>";//total hits counter$fp=fopen("counters/hits.txt","a+"); fputs($fp,"1"); fclose($fp); $totalhits=filesize("counters/hits.txt");echo "-Total hits: $totalhits</small></p><p align=\"center\"><small>";
-
Here is a page created for wap that tells many different times around the world.... <?phpheader("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\"http://forums.xisto.com/no_longer_exists/ "<!-- wappyTIME v1.00 -->\n";echo "<!-- Copyright (C) wappyCULT 2006-2007 -->\n";echo "<wml>";echo "<card title=\"wappyTIME\">";echo "<p>\n";echo "<small>\n";global $timezone; $valandos=date("H")+$timezone; if ($valandos>23) $valandos=$valandos-24; $data=date("".$valandos.":i"); echo "London - $data<br/>";$timezone=+1;global $timezone; $valandos=date("h")+$timezone; if ($valandos>23) $valandos=$valandos-24; $data=date("".$valandos.":i"); echo "Berlin - $data<br/>";$timezone=+2;global $timezone; $valandos=date("h")+$timezone; if ($valandos>23) $valandos=$valandos-24; $data=date("".$valandos.":i"); echo "Kiew - $data<br/>";$timezone=+3;global $timezone; $valandos=date("h")+$timezone; if ($valandos>23) $valandos=$valandos-24; $data=date("".$valandos.":i"); echo "Moscow - $data<br/>";$timezone=+7;global $timezone; $valandos=date("h")+$timezone; if ($valandos>23) $valandos=$valandos-24; $data=date("".$valandos.":i"); echo "Hong Kong - $data<br/>";$timezone=+8;global $timezone; $valandos=date("h")+$timezone; if ($valandos>23) $valandos=$valandos-24; $data=date("".$valandos.":i"); echo "Tokio - $data<br/>";$timezone=+9;global $timezone; $valandos=date("h")+$timezone; if ($valandos>23) $valandos=$valandos-24; $data=date("".$valandos.":i"); echo "Sydney - $data<br/>";$timezone=+19;global $timezone; $valandos=date("h")+$timezone; if ($valandos>23) $valandos=$valandos-24; $data=date("".$valandos.":i"); echo "New York - $data<br/>";$timezone=-10;global $timezone; $valandos=date("h")+$timezone; if ($valandos>23) $valandos=$valandos-24; $data=date("".$valandos.":i"); echo "Alaska/Hawaii - $data<br/>";echo "---<br/><a href=\"index.php\">wappyCULT</a><br/>---<br/>© wappyTIME 2006-2007";echo "</small>\n";echo "</p>";echo "</card>";echo "</wml>";?>