Jump to content

bran

Members
  • Posts

    15
  • Joined

  • Last visited

    Never

About bran

  • Birthday 03/30/1979

Contact Methods

  • AIM
    branamir1979
  • Website URL
    http://www.iwannabeaculjan.com
  • Yahoo
    bran_mendeleyev

Profile Information

  • Gender
    Male
  • Location
    Savannah, GA

bran's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The whole possibility of 'unknown' caused a whole host of problems and was discarded. I just mentioned it because of the formatting in the db. The column is set to TEXt but the value stored there is a timestamp.
  2. it's stored as TEXT in the database. I had originally intended for 'unknown' to be a possibility when metadata was not available.
  3. Hi all. I'm having some issues with time/date conversions. I'm pulling the original info from the metadata of photos, for example 2007:12:15 20:53:37 I'm then using strtotime() to convert it to a timestamp and store it in the db. Later on, I use date() to pull it back out and display it in a more friendly format, like Dec 15th, 2007, 8:53 pm. When I do this conversion in a test page, ie: $time="2007:12:15 20:53:37"; echo ("time is ".$time."<br>"); $time=strtotime($time); echo ("time is ".$time."<br>"); $time=date("D F j, Y, g:i a",$time); echo ('time is '.$time); then it works fine, I get back the same time that I put in, in a nicer format. When I try to do it on my page, though, after letting the timestamp ferment in the database for a bit, I'm getting back a time that is off by 2 hours later, 10:53pm. I've picked through the code on both pages and can't see any reason why it wouldn't be the same as the test. Any ideas?
  4. Been poking around and looking at things. Three accounts had session hash turned on so that it displays in the URL. I only know a little bit about sessions; could a link including the session hash be used to access the page without being logged into an account?
  5. Couple more details in response to cooldude's suggestions: Captcha isn't needed. All registrations are approved manually. I will have read up on the IP stuff. I don't know much about how to capture them or what to do with them afterward. I do have a login system on the forum. I included the forum's global.php in a test page and then output all defined variables. I tested it while logged in and while logged out and felt like I could block spammers by simply saying: if(!isset($wbbuserdata['username']){ access_error(); } because when I was logged out, no username was shown in the defined variables. access_error() is one of the forum's functions that gets included by way of global.php, it just shows an error page and then does exit(). Also worth mentioning: all of the spam is on the photo gallery, never any on the forum.
  6. Hi all. Let me try to to sum this up as quickly as possibly. I have a website for my family and friends, I installed Burning Board Lite on it. I made a really basic, bare-bones photo gallery with comments. I started getting spam comments, lot of them. So I went into the forum admin and removed all privileges from guests - they cannot view anything if they are not logged in to an account. Then I added a little bit of code to the other sections of the site that check to see if the user is logged in to a forum account. If not, they get an error. I still get spam. So I had it start recording the forum username of the comment poster (thinking maybe someone didn't logout on a public PC or had spyware or who knows). The spam comments are coming in under username '0', which in this case I assume means 'false', as in no username was detected. I think (hope) I can finally end this by simply checking for a valid user account before posting a comment to the database. However, since it SHOULD be impossible to even access the page that posts the comments without an account, I have doubts. Anyone have any ideas on how this could still be happening and/or how I can block it?
  7. rand(lownum, highnum) will generate a random number between lownum and highnum, inclusive.
  8. $picid is set higher up in the file. it, along with the clsing brace for the if statement, got chopped off when I cut/pasted. The rest of the info sounds like good advice for neatening everything up, but if I understand all you're saying correctly, it all should work as it is (and it does on the other form, all I did was change the variables).
  9. Ok, I'm trying to make a very simple form to add comments to images in a gallery. I pretty much copied the form and the code to insert it into the db from a form I have that already works. For some reason, though, this one will not. It isn't giving errors or anything. I click submit, it reloads the page, and nothing is in the db. Can you spot any eerrors in the code? I know its going to be something dumb when I figure it out. Thanks for any help. [code]echo ('<form action="http://www.iwannabeaculjan.com/test/test2.php" method="post">'); echo ('Submitted By:<input type="text" name="submitted" size="30"><br>'); echo ('Comment:<textarea name="comment" rows=3 cols=30></textarea><br>'); echo ('<input type="submit" value="Add Comment">'); echo ('</form>'); $submitted=$_POST['submitted']; $comment=$_POST['comment']; $time=time; if (isset($comment)) { $sql="INSERT INTO piccomments (picid, comment, when, who) VALUES ('$picid', '$comment', '$time', '$submitted')"; $result=mysql_query($sql); } else { exit();[/code]
  10. bran

    timed delay

    Well. LOL. Wasn't looking for quite that fancy, but it definitely makes me think I need Flash to do anything very complex.
  11. bran

    timed delay

    [!--quoteo(post=355248:date=Mar 15 2006, 02:28 AM:name=keeB)--][div class=\'quotetop\']QUOTE(keeB @ Mar 15 2006, 02:28 AM) [snapback]355248[/snapback][/div][div class=\'quotemain\'][!--quotec--] How would you like to make it more sophisticated? [/quote] Well, I looked at the mp3 player on my sister's MySpace page, for instance. That actually got me to thinking that maybe I should be using Flash instead of just PHP (PHP can be used in Flash, can't it?). I downloaded it and looked at the code, but it is way beyond the basics I have gotten into so far. With the version I've come up with so far, it has to refresh the page to pull a new song, and it has to play in an iframe. I think those are both weaknesses that will hamper me adding some of my wish list features later on. I ultimately want to have a member rating system that affects a weighted random song selection. I'm not far enough into it to know if the refreshing will affect that, but for now I am pondering how to pause and restart. Skipping songs was easy, just a button that refreshes the page. But even if you pause, the timer on that meta refresh is still ticking.
  12. bran

    timed delay

    That did the trick. Hopefully with some experience I can come up with something a little more sphisticated, but this works. Thanks for the help.
  13. bran

    timed delay

    Okay, so both of these suggestions create a delay. But they are delaying the entire page to load. Here's what I'm doing, more specifically. I'm selecting a random sound byte from a databse and playing it. That part works fine. I want to loop it so that when the sound byte ends, it will select and play another. I was expecting to use this delay funtion to do so. I basically have 3 parts to my code. The first part selects the file to be played and prints the name of the clip. The second part generates an iframe and plays the sound in it. The last part should be the delay before it loops back to part one. Well, part one is printing, but part two isn't executing until after part three has done. Is there maybe a way I can force it to generate the frame before proceeding? Also I am running into a problem with the maximum execution time of 30 seconds, but I am going to try to raise it. Is that a bad idea?
  14. bran

    timed delay

    I think either of those solutions will work for me. Thanks for the help ya'll! The sleep function will probably do it more simply, but I want to understand the other solution, too. I have one main question: 1) I don't understand the use of the substr function. I looked at the manual on php.net, but I'm not grasping the application. Can you explain what it's doing in this particular application?
  15. Ok, I'm pretty new to all of this, but I feel like I've got a good grasp of the basics. Here's what I'm trying to do: I want to create a loop that will pause for a certain number of seconds at the end, before it runs the next iteration. I've been trying to do some stuff with the time() function, but nothing that is producing any results. Below is something along the lines of what I'm messing with. I save the atart time as a variable, and then I'm trying to make the loop continue only if a certain number of seconds have passed. If I can just come up with a loop that will print the current time every 5 seconds, I can adapt it as needed. [code] $start=time(); $i=1; while ($i<=10) {      $now=time();      if ($now>$start+5) {;           $i++;      } }[/code] This doesn't do anything, but hopefully it illustrates what I want, and maybe where I'm heading in the wrong direction.
×
×
  • 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.