Jump to content

jackpf

Members
  • Posts

    1,410
  • Joined

  • Last visited

    Never

Everything posted by jackpf

  1. Use a while() loop to get each file in the directory, and unlink that file in the loop. Then delete the directory. I don't think there's an easier way than that...
  2. Idk what you're trying to do, but is this it? <pre><?php $file = fopen("index.php", "r"); while(!feof($file)) { $myArray[] = fgetcsv($file); } print_r($myArray); ?>
  3. Hmm...try echoing out the variables in where you're defining them. Chances are you're script isn't inheriting them.
  4. You can't really obfuscate the source of an iframe, as the browser needs to be able to read it. However, you could use cURL to open pages. So, for example: //in your iframe page <iframe src="curl.php?id=1"></iframe> //and then in curl.php $id = $_GET['id']; $sql = mysql_query("SELECT * FROM table WHERE ID='$id'"); $fetch = $mysql_fetch_array($sql); $link = $fetch['link']; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $link); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $return = curl_exec($ch); curl_close($ch); echo $return; Something like that anyway.
  5. So...what's actually the problem? And that foreach loop is unnecessary as you're essentially just repeating the while loop.
  6. And is the file that defines the constants including the file that sets the variables?
  7. Well if you just used variables or constants, then you'd only have to edit one file as well. But what's not working with your definitions?
  8. http://www.tizag.com/mysqlTutorial/mysqlconnection.php There you go.
  9. This seems like a pretty odd way of doing things anyway. If you've got variables already set, use them. If you want to use constants, just use constants instead. It sounds stupid to me to have both set to the same thing.
  10. Count your column names on the left side of "VALUES", and then count the values on the right. You'll find they don't match. Idk what doesn't match, you'll just have to look. You know your db/what it's supposed to be doing better than me.
  11. What's going wrong? And you don't need quotes round variables.
  12. It means that you've got INSERT INTO (columnames...) VALUES (values...) but you've got more column names than you have values.
  13. Jesus...put that in code tags... And also, put or die(mysql_error()); after every query.
  14. Hmm...well, have a look at the cookie information and see when it expires. If it's set to "end of session" or something, then there's not really much you can do with the cookie. If you want to log people out after a certain amount of inactivity, you can do so if you log each page visit in a db.
  15. Your server probably has software installed to help protect you against sql injection. With an attempt, it'll serve a 403 page and probably temp ban the IP or something.
  16. Is it "AND" you're looking for?
  17. Is this site online? Wouldn't mind a look...
  18. This isn't ajax. And define "not working"...
  19. If you're using Firefox, it may be tab preservation that's causing this.
  20. $d = time() - $last; echo date('H:i', $d); Somethign along those lines.
  21. If you use double quotes you need to put {} around your arrays.
  22. PHP doesn't include the files over HTTP request so it doesn't matter if you protect them.
  23. Seems ok. I do, however, only possess novice hacking skills
  24. Well if you haven't defined the function, it's not going to know what to do is it?
×
×
  • 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.