Jump to content

The Eagle

Members
  • Posts

    132
  • Joined

  • Last visited

    Never

Everything posted by The Eagle

  1. @newbtophp Yes, I agree, that's why I stated it wasn't a stronghold, but some people don't support JavaScript or enable it, I still think PHP is a better option to go with this.
  2. Inserting the data retrieved into a text database isn't really a good choice for taking quizzes, your solution would be a MySQL database or even emailing the answers to somebody.
  3. Can be easily done, if you'd want I can write up a small PHP application for you. Just a question, is it the same day every month? I'd assume so.
  4. I'd say PHP, some browsers may not have JavaScript (not a stronghold but just my example). echo date('l jS \of F Y h:i:s A');
  5. What I posted will work, but you cannot trust it always. It can be sometimes forged or not even set at all, they could have opened it up in a new window and the referrer is pretty much garbage then.
  6. So many bumps... eventually your question will be answered not really a need to bump it constantly. $refer = $_SERVER["HTTP_REFERER"]; echo "$refer"; Why not use that?
  7. At PHPFreaks, we're here to help you when you need assistance, not here to write the code for you. Also this seems like a lot of work, maybe we'd be glad to write a few lines but designing an entire module for you will not happen.
  8. For instances such as this your best way to go is MySQL databases.
  9. Since your issue seems to be resolved, you can help keep the forums tidy by marking this topic solved.
  10. I thought it would display an error if the name was already taken.
  11. Well, you can look it to reCAPTCHA's email hiding code. http://www.google.com/recaptcha/mailhide/ I think they have an API that may suite you.
  12. Erm, yes I figured that out after I posted. I moved it from top of webpage to just above my banner... and it's fixed on all browsers (what I try to aim for) thanks. (http://vazzer.net/) Solved.
  13. The code below is used to record how many current visitors are on my website, when I have it below it messes up my navigation (ONLY ON IE). Google Chrome and Firefox are fine, I remove the echo [at bottom] and it's fixed. <?php $dataFile = "visitors.txt"; $sessionTime = 100; //this is the time in **minutes** to consider someone online before removing them from our file error_reporting(E_ERROR | E_PARSE); if(!file_exists($dataFile)) { $fp = fopen($dataFile, "w+"); fclose($fp); } $ip = $_SERVER['REMOTE_ADDR']; $users = array(); $onusers = array(); //getting $fp = fopen($dataFile, "r"); flock($fp, LOCK_SH); while(!feof($fp)) { $users[] = rtrim(fgets($fp, 32)); } flock($fp, LOCK_UN); fclose($fp); //cleaning $x = 0; $alreadyIn = FALSE; foreach($users as $key => $data) { list( , $lastvisit) = explode("|", $data); if(time() - $lastvisit >= $sessionTime * 60) { $users[$x] = ""; } else { if(strpos($data, $ip) !== FALSE) { $alreadyIn = TRUE; $users[$x] = "$ip|" . time(); //updating } } $x++; } if($alreadyIn == FALSE) { $users[] = "$ip|" . time(); } //writing $fp = fopen($dataFile, "w+"); flock($fp, LOCK_EX); $i = 0; foreach($users as $single) { if($single != "") { fwrite($fp, $single . "\r\n"); $i++; } } flock($fp, LOCK_UN); fclose($fp); if($uo_keepquiet != TRUE) { // echo '<b>' . $i . ' visitors online</b>'; } ?> What's the problem?
  14. Well you can try replacing like @ in the email. <?php $str = str_replace("@", "(at)", $post); echo $post; ?> So if somebody posts [email protected] it will show bob(at)bob.net.
  15. Whenever I used PHP mail I'd do this and it'd work. // message $message = ' <html> <head> <title>Hi</title> </head> <body> <p>text!</p> </body> </html> ';
  16. Andy-H is right. You should stop using these for safety precautions.
  17. You'll need to carry the MySQL data, I don't recall sessions carrying all that information to be safe.
  18. Try with the spacing. Also $this (I thought it was a pre-defined variable) isn't defined but I am not too sure if that's the issue. echo " .$this->$test. ";
  19. You want some clean coding, you should watch for spelling mistakes. You spelled the word password incorrectly below. Also, your PHP code is looking for "user_name" where you have not sent it, your form is sending data with "name" so take the below code and replace it with your HTML form and see how it works.
  20. Pretty sure mkdir will do you just fine with this, I think below will work not sure you can try. $thisdir = getcwd(); if(mkdir($thisdir ."/filename" , 0777)) /// $thisdir = directory script is in || /filename is the filename || 0777 is perms { echo "Directory has been created successfully..."; } else { echo "Failed to create directory..."; }
  21. I've never saw them headers used in that format before, I've always used. mail( "$youremail", "$subject", $message, "From: $email" );
  22. Well, I am not too familiar with CuteFTP. You can right click the directory images, go to Permissions or Properties ~> and make it Read Only. This should work because it definitely seems your host is a Windows server.
  23. Anuktha, I do not understand your question. What do you need help with us on this script?
  24. Well, you have to elaborate more, we cannot go to that localhost as it is on your computer, what exactly do you want to do? <a href="/">this?</a>
  25. Not exactly, just your script because it needs it to be CHMODDED to move folders (and I think write to 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.