Jump to content

rlelek

Members
  • Posts

    41
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rlelek's Achievements

Member

Member (2/5)

0

Reputation

  1. Well, I did some more poking around, and found the solution. Apparently, one of those many FireFox add-ons was making an additional request to the same page (for debugging purposes I'm sure). :facewall: Must have been one of those early-morning moments! For those of you that have issues with anything, try disabling FireFox Add-ons or try using a different browser! Ryan
  2. Greetings all, I'm completely stumped...so I'd like to run this issue by you guys (and gals!). I have encountered an odd issue, and I have no idea why this is doing what it's doing. When I execute the following code, all by itself, in an "index.php" file (with no other files around...completely isolated!) I get a result of "testtest" $log_file = 'all.txt'; $handle = fopen($log_file, 'a'); fwrite($handle, 'test'); fclose($handle); Note: I delete the file each time I execute the script (in a browser). I am also the only one running this script. I've tried running on PHP 5.2.x and PHP 5.3.x I have also tried on my machine as well as a separate, remote machine. Is the script running twice? If so, what's causing it? Any help is appreciated as always! Ryan
  3. Agreed, do not build your own. Shop around and be sure your hoster allows streaming video. Scale when you are ready.
  4. Hello, It's odd that you were instructed to have 4 corner images (vs 2 images with 2 corners). Normally What i'd do is this... <div class="top_two_corners"></div> <div class="content">Content goes here</div> <div class="bottom_two_corners"></div> And then use CSS to do the background as you were doing. This way though, your content div can be a normal square box, and the corner divs can be used to add the rounded corners only (no content). Hopefully this makes sense to you If not, i'll try to elaborate more. Ryan
  5. What is the file being used for? Is the file used for data-storage (read/write by a computer)? or is it like a document where it's a bunch of text intended to be read by a human (and not a computer). If it's for data-storage, use a Database or XML (I guess you could use INI - ewwwwww). A Database would probably be the easiest.
  6. Sounds like a job for.... *ModRewrite* http://www.workingwith.me.uk/articles/scripting/mod_rewrite Throw it in your .htaccess file
  7. Hello There, I don't mean to be rude, but if you have to ask how much power you need for a server, are you sure you can configure it to do what you'd like? Linux (assuming that's what your server will run), especially without a GUI (which is what most server configs are), is not something you'll want to just jump into. Also, why build your own? Will your server have redundancy? Will it have "server-grade" components? These are things to consider depending on how serious you are. For example, you could easily use an old PC, even with a 1GHz processor and 128 MB of RAM for your personal site so your friends and family can visit, but YouTube/Vimeo/etc are clearly running on better hardware. All in your intended use. If you decide to continue, the rule of thumb is the more power the better (for single-servers anyway). RAM is fairly cheap now, so i'd say no less than 2GB for video. Honestly, you can probably get away with 1 GB or even 512MB, but again, there's no excuse not to have more these days. I think 2GB of RAM and a 3GHz Processor for a server should last you many years to come. Just my opinion, but I usually err on the safe side of "Better safe than sorry" Ryan
  8. I can vouch for FPDF - a pleasure to work with! The documentation does a great job of explaining it, though you'll have to put your mind into "graph" mode as the layout usually involves setting an X/Y Coordinate and then having the library do what you need it to do.
  9. No need for those... Donate 10% of your budget on those products to this guy... http://sourceforge.net/projects/php-screw/ It could be what you are after. But ***REALLY****. Donate to him. Developing this stuff is hard work. And no, I am not that guy. By the way, your thread title is misleading... Try adding "Protection from" to the beginning because as it stands right now, I thought you wanted to pirate something in PHP...and not pay for it This is why you may not have received as many posts as you would have liked Ryan
  10. Hey there! First...why checkboxes? A few server a good purpose, but why not use something like "select" fields that are intended for a large selection of options. Just saying... Doesn't make sense to me. As for your question... Try to loop (for or foreach) through all 100 and then loop through all 100 within the loop. ex. Looping 1 - 100 Item 1 - Looping 1 - 100 Item 1 Item 2 Item 3... Item 2 - Looping 1 - 100 Item 1 Item 2 Item 3... And so on... This way you can run through all the combinations! If you need help with the syntax/code, try posting back... But please try first!!!
  11. Hey there... Here's something I came up with that'll work just fine. The script in its current state isn't fort knox (actually, you can beat the login again by clearing your browser cookies). I did make this script and usaully what happens in these forums is we only hint at you to find the answer yourself. I actually solved the problem for you, and I don't mind, but please do me and the other forum posters one thing. ***** Learn From The Script***** Do not just implement it and never give it a second thought. Anyway, here it is, functional in full...And well documented! <?php // Start or Resume a Session session_start(); // How long is the user allowed to be idle? $idle = (15 * 60); // In Seconds // See if the User has been idle for too long // If he/she has, then log them out. // Otherwise, update their status. if(isset($_SESSION['time'])){ // Debug debug($idle); // How long from his/her last visit? $time_elapsed = (time() - $_SESSION['time']); if($time_elapsed < $idle){ // Update user's activity $_SESSION['time'] = time(); echo 'Activity Updated'; }else{ // He/She has been idle for too long echo 'You have been idle for too long<br />Please login again'; // Do Your Logout Function Here } }else{ // This is his/her first visit. $_SESSION['time'] = time(); echo 'First Visit'; // Possibly Require Login Here } function debug($idle){ echo '<br />------- Debug -------'; echo '<br />Time: '.time(); echo '<br />Last Activity: '.$_SESSION['time']; echo '<br /> Time Elapsed: '.(time() - $_SESSION['time']); echo '<br />Idle Time: '.$idle; echo '<br />----- End Debug -----<br /><br />'; } ?>
  12. I don't see any errors on the page. Is everything good now?
  13. Hello, Two guesses... #1 - You are reassigning the variable to something that is undefined (aka, blank). right here -> $email = $email; $_SESSION['name'] = $first; $_SESSION['email'] = $email; $_SESSION['telephone'] = $telephone; if $email is not defined (and i don't see that it is), then you will be assigning it no value. #2 - How are you getting from $_POST['email'] to $email? I never saw a statement like $email = $_POST['email']; Ryan
  14. Hello! I Get a 404 for http://zepx.co.cc/links/ I, along with most of the PHP programmers I know, will always use require_once(); We usually use that simply because if it is loaded, you do not want an error returned if it was already included. Maybe try switch both to require_once(); and see if your problem still exists. If it does, see if you can get the webpage working because a live example is like a picture...worth 1000 words! Ryan
  15. Hey There, Thebadbad is absolutely right! if you have variables within single quotes ('), they are always interpreted *literally* Use double quotes (") to have PHP interpret the variables. Logic, though, should not be in quotes at all (like your "if" statement) (($admin == 1) ? '<p><a href="member.php?change=admin">Admin Center</a></p>' : ''), will work but I generally try not to use it. (It acts like a shorthand if/else). What i would do personally is append that data to the array value. Ex. $data = array( '<p><a href="logout.php">Logout</a></p> <p><a href="member.php?change=password">Change Password</a></p> <p><a href="member.php?change=email">Change Email</a></p> <p><a href="member.php?change=account">Close account</a></p>', '<p>Welcome to the members only page '.$_SESSION['s_name'].'!</p> <p>You are logged in as '.$_SESSION['s_username'].' from the IP address '.$_SERVER['REMOTE_ADDR'].'</p>', ); if($admin == 1){ $data[0] .= '<p><a href="member.php?change=admin">Admin Center</a></p>'; } Just a personal Preference Ryan
×
×
  • 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.