This function is what I used:
function getId ($ip) {
$ipData = file('idData/ips.txt');
$ipData = array_flip($ipData);
$id = $ipData[$ip] + 1;
return $id;
}
It is defined in idData.inc.php which is required in the file with the
problem (controlPanel.php).
I decided to ban a third
For a logging system that I've been writing I came up with a way to asign
a unique id number to every IP address that visits the site. What I do
is append every *new* IP to a new line in a file (ips.txt). Then when I
have an IP and need the id I file() the ip log to put it in an array,
array_flip
I am making an authorizatoin script for the control panel of a loggin
system I have been writing. Here is what I have right now:
The problem is that if a user clicks cancel the control panel loads
instead of the program dying. Why and how do I stop it?
Thank you,
--
Kyle
--
PHP General Mail
FYI there were no newlines involved in my program. (go back to the
message and read the code)
On Fri, 4 Jul 2003 12:06:46 -0700 (PDT), "Rasmus Lerdorf"
<[EMAIL PROTECTED]> said:
> On Fri, 4 Jul 2003, Robert Cummings wrote:
> > Undoubtedly the above will work as we both know, the output will be
>
No, because if i did that the counter would increment no matter what the
IP address is. The way I have it the counter will only increment if it
is a new ip address to the site. I just fixed it by switching
$current++; to $current += 1; Apparently there is some small difference
between the two.
Why does this not work? It is just a simple hit counter (hence the
snarls, hissing, and growling). It logs the ips address but does not
increment $current or log it. I do have counter.txt and ips.txt chmod'd
to 777. Ips.txt starts blank and counter.txt starts with just a 0 in it.
--
Kyle
--
I think this is short example of my problem...
Right now this returns: hello x != 1
What do I have to do to get bye() to return 'x = 1'? I tried declaring
the x = 1 in hello() global and I tried declaring it static.
On Tue, 01 Jul 2003 17:27:48 -0500, "Kyle Babich" <
Any php programmers out there have a little free time? I've been trying
to find the bug in my logging system forever and I've all but given up.
If anyone else wants to try their luck then...
http://babich.us/log/source/log.php.txt
http://babich.us/log/source/config.inc.php.txt
http://babich.us/l
PROTECTED]> said:
> Yes beacause the real extension is .php
>
>
> On Tue, 2003-07-01 at 17:38, Kyle Babich wrote:
> > When .inc.php files are included they are also executed whenever the
> > script is executed right?
> > --
> > Kyle
> --
> Yann Larrivee &
When .inc.php files are included they are also executed whenever the
script is executed right?
--
Kyle
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
How would I set the file pointer to the very end of the last line of the
file?
ex. ahkjhff
asdjfhlkajf
sdfhaksljdh
kasjdhkjlfh
asdjfhklajs
askjdhjfdjf//here
Thanks,
--
Kyle
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The following code obtains lists of files from two different directories and reverse
numerically sorts them. Then bellow it takes one file and dumps the contents into an
array, which works fine. The problem is where it takes the entire content of the
matching file from the second directory and
I have a file, current.txt, that at the start has only the digit 1 in it. Here is my
code:
$current = readfile('setupData/current.txt');
foreach ($HTTP_POST_VARS as $index => $value) {
$index = $HTTP_POST_VARS['$index'];
}
$info = fopen("postInfo/{$current}-{$dateFile}.txt", 'w');
fwri
That works, thanks.
> Try setting that date as a type="hidden" value instead. Do a
> print_r($_POST) at the other end to see what comes up!
>
> -Michael
> On Fri, 2003-06-20 at 08:55, Kyle Babich wrote:
> > I have a input field in a form that is disabled
Nothing passes when it is disabled via HTML either.
> just for shits and giggles, why not manually disable the field without using
> javascript and see what happens. just add the word "disabled" to the tag.
>
>
> >From: "Kyle Babich" <[EMAIL PROTECT
I have a input field in a form that is disabled by javascript but is assigned a value
in the code that is the RFC 822 formated date. Why is this field not included in the
$HTTP_POST_VARS?
Here is the page I am talking about:
http://babich.us/xlog/post.php
When the page is submitted all other v
Thank you to those of you who helped me with my last problem earlier today.
Now I have a text file (setup.txt) that has a series of values all seperated by
\r\n's. Inside of another file I'm trying to read setup.txt into $rawSetupData and
explode that with \r\n's into an array called $setupData
> What kind of 'logical' order do you need for the Post array?
>
> To clarify:
> Do you need to write to a file the POST variables passed to the script?
Yes, setup.php -> processSetup.php -> setup.txt
>
>
> "Kyle Babich" <[EMAIL PROTECTED]>
I have a form (setup.php) that passes values to processSetup.php when they are written
into setup.txt. I'm trying to instead of writing every idividual value into setup.txt
from setup.php, write a loop that will take as many values as there are in the $_POST
array and write them all into a sing
art modifying it to a 3-file form.
>
> I'd personally push forms through using POST method rather than get
> whenever
> possible -- especially when dealing with files... the manual does it this
> way too :)
>
>
> Justin
>
>
>
> on 12/01/03 12:18 PM, Kyle B
I just broke skin with php and I'm learning forms, which I'm not good
with at all. These are snippets from post.html:
and
but how would I pass the actual image on because when I do something like
this:
as you could probably guess only the filename prints.
So how do I take the image instead
21 matches
Mail list logo