Jump to content

Flames

Members
  • Posts

    244
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Flames's Achievements

Member

Member (2/5)

0

Reputation

  1. the php open tag is <?php
  2. I'm just wondering, I did Google the matter and there was information saying it both ways, a lot of smaller files means more HTTP requests but large files require more packets for data transmission which takes longer. I assume that they're both the same when it comes to caching? I've also heard about gzipping the files which apparently speeds up requests but it doesn't work universally? And for my final question, is it the same when it comes to CSS?
  3. The file doesnt exist already, this function is meant to create a new file, I've looked on the internet and this seems to be the correct method.
  4. My current code is the following (it is implemented with ajax so that's why its coded like that) function create() { if(isset($_POST['file'])) { $file = $_POST['file']; } if(file_exists($file)) { echo "File already exists, please edit the existing file or delete it and try and create this file again."; die(); } if ($fh = fopen ($file, "w")) { // line 108 fclose ($fh); echo "File created successfully"; die(); } echo "Could not create new file"; } I get the error Warning: fopen(...) [function.fopen]: failed to open stream: No such file or directory in ... on line 108 Could not create new file all folders are chmodded 0751 apart from one which I changed to 0777 but that still doesnt work Any help would be appreciated
  5. Yeah after you gave me that I managed to find it, surprisingly they arent in the jQuery documentation
  6. Anybody know how you can make an ajax event run every x seconds (lets say 5 for now) using jQuery?
  7. <div class="menutitle" onclick="SwitchMenu('sub1')">Staff Panel</div> <span class="submenu" id="sub1"> <?php var_dump($row['level']); if($row['level' == "owner"){ // line 132 ?> - <a href="../admin/index.php" target="mainFrame">Admin</a><br> <?php } ?> Try it like that
  8. they should if your only using y and n, but if you use h for example the first one would be true, second would be false.
  9. is the mysql field called level? also owner should be encased in ", i.e. "owner"
  10. varchar fields are limited 255 characters for 8000 characters you need to use a text field.
  11. From that post I gather that I shouldn't ban proxies so I think Ill just stick to logging all login IP's and checking that for the whole session there IP is the same and just log every different IP a user logs in from, is that a good way of doing it?
  12. How do you automatically ban proxies?
  13. This is more theory than code but I was wondering if I wanted to make a secure website, game or web application etc and I wanted to use IP to protect what ever it was, how would I go about doing it. A lot of things on the web use IP's for security but I couldn't think through a perfect system of how to do it. The easiest way I could think of is just to log each users IP every time they log in but what if they log in using a proxy and then stop using the proxy and therefore not have there real IP logged, should I just the IP on every page load? But then there's a problem if they always use a proxy IP and therefore I can never log their real IP and therefore 1 person could be 2 users and the IP's wouldn't show that. But then again it works the other way as well, what happens if 2 people have the same IP but are different people using different computers with a shared IP which some hosts do. Finally what happens if I want to IP ban someone and it stops everyone from that IP accessing the website, say if it was a public library, school or again just a shared IP address. What's the best way of using IP's for security?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.