Jump to content

Daguse

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://myaltrego.net

Profile Information

  • Gender
    Not Telling

Daguse's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. try date("m-d-y h:i:s A"); Best site you can use for small things is google or http://us.php.net/manual/en/index.php
  2. Ok well is there perhaps another way I could do this?
  3. NJ in Clifton. They do run DLS.
  4. any one else got some pointers.
  5. I know only basic PHP so I can't really give you many details but here we go. First I see you got a form to get the URL. From there your going to need to look at the your going to need to find some way to get the info thats on that site. Most search engines use web crawlers; computers that go to the site and follow all the links and grab the data for you. But another way is to maybe to grab the source of the page. From there you can past that data into form and have it look for key meta tags. This page has <meta name="description" content="Post reply" /> <meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" /> Then your script will take the tags and well, store them. As you can see just by the tags this page is used to Post Replies and is for PHP, MySQL and so one. As for what Aqpti posted, all I can say as make sure to give as much detail as you can so the real pros can help. Helps keep them from getting testy.
  6. sorry, I see now I posted old code. I use date('I'); still does not work. //date time stamp with local time. $DLS = date('I'); if ($DLS > 0) { $tz = -4; } else { $tz = -5; } $timezone= $tz; $time=time(); $gmttime= gmdate("M d Y H:i:s", $time); $sqldate=date("Y-m-d H:i:s",strtotime("$timezone hours",strtotime($gmttime)));
  7. Thanks to unkwntech I found that Date(I); will tell me if the date is daylight saving time or not. 1 if is, 0 if not. However we are in DLS and I am getting a 0. Any Date(I, mktime(any date)); I get 0. even just Echoing Date(I); I get 0. Is there a reason for this? To give the full pic here, I am trying to make an SQL input with the current date and time. However when DLS comes and goes it changes my input by an hour. Code below. //date time stamp with local time. $DLS = date(I); if ($DLS > 0) { $tz = -4; } else { $tz = -5; } $timezone= $tz; $time=time(); $gmttime= gmdate("M d Y H:i:s", $time); $sqldate=date("Y-m-d H:i:s",strtotime("$timezone hours",strtotime($gmttime))); Thanks all for helping a basic newbie.
  8. So where did all the little code snippets go? They use to have them all over the site. Ok down to the question at hand. I am trying to make it so my system knows if its daylight savings or not. Now what I was thinking was if I can filter the month and then use a if statement to determine if the month is in daylight savings and then use that to select the negative form zulu. The question is how to filter the month and find out what month it is from the date() or time() code. Code below! $timezone=-5; $time=time(); $gmttime= gmdate("M d Y H:i:s", $time); $sqldate=date("Y-m-d H:i:s",strtotime("$timezone hours",strtotime($gmttime))); I know its easer then I am making but thanks for the help!
  9. I am trying to set up a way to auto delete rows in my DB after 3 days if they have not been locked. How would be the best way to do this? Thanks for all the help.
  10. Cool thanks.... I may end up going with java if I have to.
  11. I really don't know where to start with this one, so any help would be good. I am wanting to make a drop down menu for date selection. I don't realy want to use java if I don't have too. Any help would be great and thank you!
  12. for Problem 3, I would use htmlentities($title). That way if they do make a title with HTML it will echo the HTML tags as text.... all you would see is <b><image src=''>HEY LOOK AT ME</b>.
  13. [!--quoteo(post=380032:date=Jun 4 2006, 05:27 PM:name=SetLar8)--][div class=\'quotetop\']QUOTE(SetLar8 @ Jun 4 2006, 05:27 PM) [snapback]380032[/snapback][/div][div class=\'quotemain\'][!--quotec--] Hi, I have this same problem and am using the nl2br function. But if someone sends a message with one or more single quotes in it i get the following: typed in textarea: foo isn't bar displayed in HTML: foo isn\\\'t bar For some reason 3 backslashes are added before the quote every time and this happends to every quote in the message. e.g. He's it's she's = He\\\'s it\\\'s she\\\'s How can i stop this properly? Thanks. [/quote] Try using $message = nl2br(htmlentities($message)); htmlentities($message) should get ride of the \\\ problem.
  14. Thanks, poirot! nl2br works great, but I have found two more problems. 1st! When I go back to edit the forum I see the <Br/> rather the the line break it self. To edit it the forum I just set the value to the value from the SQL db. So the script will look like <TEXTAREA>$postmessage</TEXTAREA>. So is there a way to set <br/> to make a line break in the Textarea? 2nd! Is there a way to set up htmlentities() so that I can post image and link tags in HTML formate? So say I post Check out this "G4 Mailbox" <img src="http://craphound.com/images/g4mailboxauckland.jpg"> how to I set it up so it will post the text with the "" and other HTML thing but still post the image? When posting I have the post wraped with nl2br() and htmlentities(). [code]$postmessage = nl2br(htmlentities($postmessage))[/code] I know this is a 2 part post but if any one could please point me in the right derection. Thank you! The PHP nub, Daguse!
×
×
  • 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.