Click here to Skip to main content
15,923,051 members
Home / Discussions / Web Development
   

Web Development

 
Generalphp secure lib Pin
alex.barylski7-Oct-03 18:19
alex.barylski7-Oct-03 18:19 
GeneralJSP Pin
R. Thomas7-Oct-03 16:48
R. Thomas7-Oct-03 16:48 
GeneralRe: JSP Pin
markkuk8-Oct-03 1:41
markkuk8-Oct-03 1:41 
Generalpassword auto-fill Pin
FERN7-Oct-03 12:03
FERN7-Oct-03 12:03 
GeneralHTML Form Pin
Anthony98877-Oct-03 10:43
Anthony98877-Oct-03 10:43 
GeneralRe: HTML Form Pin
Nathan Ridley7-Oct-03 15:14
Nathan Ridley7-Oct-03 15:14 
GeneralRe: HTML Form Pin
alex.barylski7-Oct-03 18:14
alex.barylski7-Oct-03 18:14 
QuestionCounting visits in my web page... How can I do it? Pin
Joan M7-Oct-03 7:34
professionalJoan M7-Oct-03 7:34 
Hello,

I'm trying to count the visits that my web page is receiving, but it seems impossible... I've been using some codes that I've found in the internet, but no one works...

here are the samples:

******************************************
SAMPLE 1
******************************************
<?
$ar = "contador.txt";
$fp = fopen($ar,"r");
$visitas = fgets($fp, 26);
fclose($fp);
$visitas = $visitas+1;
$fp = fopen($ar,"w+");
fwrite($fp, $visitas, 26);
fclose($fp);
echo $visitas;
?>


******************************************
SAMPLE 2
******************************************
<CFPARAM NAME="attributes.file" DEFAULT="contador.txt">

<cfset sPath = #GetDirectoryFromPath(CGI.PATH_TRANSLATED)#>
<cfif NOT FileExists("#sPath#\#attributes.file#")>
<cffile action="WRITE" file="#sPath#\#attributes.file#" output="0" addnewline="No">
</cfif>
<cffile action="READ" file="#sPath#\#attributes.file#" variable="Mostrar">
<cffile action="DELETE" file="#sPath#\#attributes.file#">
<cfset Mostrar = #Mostrar# + 1>
<cffile action="WRITE" file="#sPath#\#attributes.file#" output="#Mostrar#" addnewline="No">

******************************************
SAMPLE 3
******************************************
<?
$counterFile = "contador.txt";

function displayCounter($counterFile)
{
$fp = fopen($counterFile,rw);
$num = fgets($fp,5);
$num = 1;
echo "$num";
exec( "rm -rf $counterFile");
exec( "echo $num > $counterFile");
}

if (!file_exists($counterFile))
{
exec( "echo 1 > $counterFile");
}

displayCounter($counterFile);
?>


******************************************
END OF SAMPLES...
******************************************
PS:
In order to make the samples in PHP, I've changed the *.htm extension of the files to *.php; all this samples are placed in the head...

could you help me?

Thank you in advance
AnswerRe: Counting visits in my web page... How can I do it? Pin
alex.barylski7-Oct-03 9:38
alex.barylski7-Oct-03 9:38 
GeneralPayroll service Pin
ravfingcoder6-Oct-03 5:17
ravfingcoder6-Oct-03 5:17 
GeneralRe: Payroll service Pin
Nathan Ridley7-Oct-03 3:50
Nathan Ridley7-Oct-03 3:50 
GeneralRe: Payroll service Pin
devvvy7-Oct-03 4:17
devvvy7-Oct-03 4:17 
GeneralRe: Payroll service Pin
Sage16-Oct-03 8:58
Sage16-Oct-03 8:58 
GeneralProblem while posting to many asp pages from an html page! Pin
TPN6-Oct-03 0:46
TPN6-Oct-03 0:46 
GeneralRe: Problem while posting to many asp pages from an html page! Pin
Nathan Ridley6-Oct-03 17:53
Nathan Ridley6-Oct-03 17:53 
GeneralRe: Problem while posting to many asp pages from an html page! Pin
TPN6-Oct-03 20:58
TPN6-Oct-03 20:58 
GeneralRe: Problem while posting to many asp pages from an html page! Pin
Nathan Ridley7-Oct-03 3:55
Nathan Ridley7-Oct-03 3:55 
GeneralRe: Problem while posting to many asp pages from an html page! Pin
TPN10-Oct-03 21:19
TPN10-Oct-03 21:19 
GeneralRe: Problem while posting to many asp pages from an html page! Pin
Nathan Ridley10-Oct-03 22:53
Nathan Ridley10-Oct-03 22:53 
GeneralRe: Problem while posting to many asp pages from an html page! Pin
TPN11-Oct-03 18:11
TPN11-Oct-03 18:11 
GeneralRe: Problem while posting to many asp pages from an html page! Pin
Sage16-Oct-03 9:18
Sage16-Oct-03 9:18 
GeneralRe: Problem while posting to many asp pages from an html page! Pin
Philip Fitzsimons7-Oct-03 3:03
Philip Fitzsimons7-Oct-03 3:03 
GeneralRe: Problem while posting to many asp pages from an html page! Pin
TPN10-Oct-03 20:28
TPN10-Oct-03 20:28 
GeneralRe: Problem while posting to many asp pages from an html page! Pin
Philip Fitzsimons12-Oct-03 23:12
Philip Fitzsimons12-Oct-03 23:12 
GeneralWebServices and .Net Pin
sybux20005-Oct-03 9:48
sybux20005-Oct-03 9:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.