Hey... I think that worked. Can't really test it completely right now, but it looks as though it works. Thanks!
Pphreak
- May 9, 2003
- Joined Mar 27, 2002
Anyone have any idea how you could detect the connection speed of someone viewing your site?
AND calculate the estimated time for a download of a certain file. I thought about trying to ping the ip of the connection and do some math, but that's not a correct way to configure bandwidth. Anyone have any ideas about how to accomplish this?
Ok, this may be a little confusing. But how would I go about registering an unknown amount of session variables? For instance, I have a form created from information in a text file. Now, if that file changes, the amount of fields that are displayed and used are changed.
How would I go about registering all of those fields in a session? For example, would I do it like this:
session_register($var1, $var2, $var3...);
or like this:
session_register($$var1, $$var2, $$var3...);
or neither?
I want the variable to be registered and to maintain it's value.
Thanks for the help.
- In Please Help!
Ok, I've searched and looked over 20 pages on this site and just can't really find a straight answer.
I need to have users choose from a list of files using check boxes, and then have PHP zip all of these files together.
How can I do this using the latest version of PHP from php.net on a Win2k machine running IIS5.0.
Please help!
Recently we upgraded from PHP 2.something... to 4.2.3. All of our scripts were working just fine, and after the upgrade we had to do some modifying. Anyway, I've found that in one of our php pages, we have code sending info to the header:
header("Content-type: text/plain");
That line of code is causing the web browser to prompt the user to download the file instead of parsing it.
We are using IIS 5.0 on Win2k Server with PHP 4.2.3. And I've found out that we HAVE to have it send that header. So is there ANY WAY to edit IIS or PHP.INI to tell PHP.EXE how to handle this header?
Thanks!
Thanks a bunch... but does that take everything out of the array that is in front or back of it? Because if I have 4 elements in the array that it counts, shouldn't I be able to view 4 questions before I run into nothing? Because sometimes it will only give me 1 question and then everything will be gone from the array.
Phreak
Ok, this is probably simple but I can't figure out how to do it for the life of me. In my code below, I assign questions, question IDs, and answers to different arrays. Here is the code for that:
while($query2 = $db->fetch_array($query)) { $arrQuestionID[] = $query2['intQuestID']; $arrQuestion[] = $query2['varcQuestion']; $arrAnswer[] = $query2['varcAnswer']; }
Later on down the page I have the following code that grabs how many questions are in the $arrQuestion[] array, and then randomly picks a question ID from $arrQuestionID by key.
$y = sizeof($arrQuestion); $y--; mt_srand((double)microtime()*1000000); $y = mt_rand(0, $y); $arrQuestionID[$y];
So my question is, how can I remove the question element from the $arrQuestion[] array and the question ID element from the $arrQuestionID[] array? I want to do this so that if there are 8 questions in the array and everything is randomly picked, the same question doesn't get randomly picked again.
Thanks for your help.
phreak
Or more specific for your case. You would enter this for a text field for example if your url was (http://www.domain.com/script.php?user=bob):
<form method=post action="./script.php">
<input type=text size=20 value=$bob>
<input type=submit name=submit>
</form>Hope that helps clear it up a little more.
- In Reverse MD5
Anyone happen to know how to reverse a string that has been used by the md5 function, back to the original string?
I just installed the latest version of PHP on my computer at work. And I've been doing some testing with a database and other things. Anyway, when I went to check my email today, I got an email from my network admin (who has never used PHP before, and is a little cautious about it), stating this security response from Symantec: <<Symantec Security Response Advisory - Multiple Buffer Overflows in PHP allow remote access to server.url>>.
Is this a common thing? Something to be worried about? Or just Symantec being over protective? I've never heard of something like this before. Please help!!!!
Jaryd