Jump to content

elmas156

Members
  • Posts

    276
  • Joined

  • Last visited

Everything posted by elmas156

  1. Thanks Pikachu2000, do you know if there is any way to change that other than getting a new hosting company?
  2. OK, so I guess I'm going to be sending a confirmation email. Here is another question though: When an email is automatically sent using the mail() function, sometimes it takes up to 10-15 minutes. Is there any way to speed that up or does it have something to do with my server? I would like for it to take no more than 5 minutes, ideally less than 2 minutes. Ideas on this?
  3. Hello everyone, I have a site where users sign up using an email address as their username. I want to be able to verify that their email address is valid without having to send them a confirmation email that they have to click some link in before they are allowed to sign in to the website. Maybe something that pings the email server for a specific address, and if the address is not valid, alert the user to enter a valid address. Does anyone have any ideas or information that you could point me to to assist me with this task? Thanks in advance for any help or ideas.
  4. Thanks very much for your help! I think I can tweak this into some code that I can use for my purpose. Have a great day!
  5. Zurev, this works to replace any "bad words" with something else, but what about totally preventing the message from being sent if there are any of the "bad words" included in the message? Is there a way to recognize whether or not any of the words are included in the text then maybe setting a variable, say "$ok" to have the value "y" if no bad words are included and value "n" is there are bad words included? This would prevent a message like "I'm going to beat the _ out of you!" or "You're a _ idiot!" These messages would still be abusive and I want to completely prevent them from being sent. Of course, I understand that some messages would still be sent if certain terminology was not used, such as, "You're an idiot!" but I'll try to deal with that if/when it comes.
  6. Hello everyone, I have a website where users are able to send and receive messages. I am trying to devise a way that I can prevent abusive messages from being sent. The best way that I can think of to do this is to use a few key words that would likely be used in an abusive message (basically, any curse word). Does anyone have any ideas on how I can check the text before it is sent for certain key words? Thanks in advance for any help or ideas.
  7. Awesome! Thanks so much for all your help. I know you spent a lot of time that you didn't have to spend on this. I just can't thank you enough!
  8. No, wait! I guess it takes a few minutes to register because I tried it again and it works now! But the Local and the Master files both changed... is it supposed to do that?
  9. Well, I renamed php.ini to php5.ini, re-ran the phpinfo() script, but nothing changed. Any other ideas? Thanks again for your help, by the way. You're a real asset to this community!
  10. PHP version 5.2.14 My hosting is actually through cheap-domainregistration.com, which I believe is owned by godaddy.com, but I'm not sure.
  11. OK, I've added these lines to the php.ini file and uploaded it to my root directory, where it was initially. session.save_path = /home/content/29/6879529/html/save_path session.gc_maxlifetime = 36000 I ran phpinfo() again and nothing has changed for the session.save_path or session.gc_maxlifetime. I'm not getting any kind of error or anything when I try to log in to my site, but shouldn't the local values change? I'm not sure if what I've done worked or not and if there's a way to find out other than waiting 10 hours to see if I'm logged off, I would rather use it.
  12. OK, I've learned that my session.save_path is blank so my session data is being saved in a common location with other users' session data. Now, what I gathered from your explanation, is that I need to set the session.save_path and session.gc_maxlifetime (I don't actually need the session to remain open after the browser has been closed, only as long as it is left open). I do have a php.ini file that I have access to change, but I'm pretty sure that this is not going to be the master file. I'm guessing that my host is running PHP as a CGI application so I can change the PHP settings locally. Here is my php.ini file again: register_globals = off allow_url_fopen = off expose_php = Off max_input_time = 60 variables_order = "EGPCS" extension_dir = ./ upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" ; Only uncomment zend optimizer lines if your application requires Zend Optimizer support ;[Zend] ;zend_optimizer.optimization_level=15 ;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3 ;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3 ;zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so ;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so ; -- Be very careful to not to disable a function which might be needed! ; -- Uncomment the following lines to increase the security of your PHP site. ;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru, ; phpinfo, exec, system, dl, fsockopen, set_time_limit, ; popen, proc_open, proc_nice,shell_exec,show_source,symlink" So, assuming that I've come to the proper conclusion about this information, and I've created a folder named "save_path," how would I set the session.save_path and session.gc_maxlifetime in my php.ini file?
  13. Thanks for the replies... PFMaBiSmAd: I know you have to be getting tired of repeating yourself because I've read this exact post from you at least three times in other threads... the problem that I have is it's pretty much Greek to me as of now. I've never dealt with session_save.path, session.cookie_lifetime, or session.gc_maxlifetime, which is what I think you said in another threat would need to be changed in the php.ini file. I am on a shared server, and if it helps, I think there is some setting that deletes the session data file after a set amount of time because the session is automatically ended after some time, even when the browser is left open. Any idea what I might need to do and how? Thanks so much for helping someone of my ignorance level... believe me, I'm trying to improve it. Haha!
  14. Hello everyone, I've searched these forums for a while now trying to resolve a problem that I have with my sessions timing out before I would like them to, but I've only gotten confused about it. I've read about changing some settings or adding code in my php.ini file but I have no idea what I'm doing when it comes to that. I'm starting the session simply by having session_start(); at the top of each of my pages. I'm including a copy of my entire php.ini file here so that you can see what I have already. Can someone please help me to figure out what I would need to do to make my sessions last at least 8 hours? Thanks in advance. Here's my php.ini file: register_globals = off allow_url_fopen = off expose_php = Off max_input_time = 60 variables_order = "EGPCS" extension_dir = ./ upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" ; Only uncomment zend optimizer lines if your application requires Zend Optimizer support ;[Zend] ;zend_optimizer.optimization_level=15 ;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3 ;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3 ;zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so ;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so ; -- Be very careful to not to disable a function which might be needed! ; -- Uncomment the following lines to increase the security of your PHP site. ;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru, ; phpinfo, exec, system, dl, fsockopen, set_time_limit, ; popen, proc_open, proc_nice,shell_exec,show_source,symlink"
  15. Never mind... I figured out that I left out a semi-colon on line 84 ;-) I think this did the trick. Thanks very much for your help.
  16. I'm getting this error now: Parse error: syntax error, unexpected T_STRING in /home/content/29/6879529/html/mysite/newmsg.php on line 85 this is line 85: mail($sendto, $emailsubject, $emailmessage, $headers, $fromaddress); any ideas?
  17. Hello everyone, I have website that uses the php(mail) function to notify users when something happens on their account. The site was created for a school district so all the users are district employees where their incoming email is subject to pretty strict spam filtering. I am using headers to indicate to the recipient that the email is coming from support@mysite.com, but I guess the mail servers see past this and recognize that it's coming from a php(mail) function. Because of this, all of the emails being sent are being blocked by the filter. I've tried adding all emails coming from an address that ends with "@mysite.com" but this doesn't work. This is what the addresses look like that the spam filter is actually seeing: elmas156@p3nlhftpg049.shr.prod.phx3.secureserver.net And I can't just add a single address to the white list because each time an email is sent, the letters and numbers after "@" and before "secureserver.net" are different. Here's another address that shows up: elmas156@p3nlhg331.shr.prod.phx3.secureserver.net here is the code that I'm using to send the emails: <?php $sendto = "$email"; $emailsubject = "Testing Message Report For $cdate."; $emailmessage = "This is a test email."; // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'From: MySite.com Report <support@mysite.com>' . "\r\n"; // Mail it mail($sendto, $emailsubject, $emailmessage, $headers); ?> Does anyone have any suggestions on what to do to make every email sent to be recognized by the spam filter as coming from the same email instead of a bunch of random ones? I hope this is making sense to someone because it was very difficult for me to explain in writing. Thanks in advance for any help or suggestions.
  18. Hello everyone, I don't know a great deal about MySQL, or any other database for that matter, so I'm hoping someone can help me out here and make things a little easier for me. I have a site that uses a MySQL database with about 9 tables. I'm going to have to move my site to another server soon but I want to avoid having to re-create my database and all the tables from scratch using PHPMyAdmin. I do not need to keep any of the current information in the database, only the structure needs to be the same. Is there a way that I can easily re-create my database by exporting it or some other method? Any advise is appreciated.
  19. I figured it out! For those of you who may be having the same problem, here's the answer: I have no idea why this isn't working: include("http://www.website.com/include.inc.php"); But... this works fine: include("../include.inc.php"); Basically, for each "../" you put in front of the file name, it goes up one level. So if you're include file is located at "http://www.website.com/include.inc.php" and the page you are including it on is at "http://www.website.com/folder1/folder2/page.php" you would do this: include("../../include.inc.php"); Hope this helps someone.
  20. Yes, Robert is exactly right... I had the same problem a couple of months ago. The thing was, when I was building my site, I built it on a server that didn't have all the error reporting problems and it seemed to work ok. When I moved it to the permanent server, I was getting the same header error. I worked on it for a few days until I got it figured out. The bad part was that I had to completely restructure every page on my site, which took forever because I've got about 40 pages on my site that needed the restructuring in order to work properly... won't make that mistake again! Webguy.... just make sure that you are doing the actual processing of your form and the redirection ABOVE the <html> tag on your page. It kid of seems kind of like this is done backward but think of it this way: The code at the top of the page is ignored by the server when the page is first visited and the actual form is displayed. After the form is submitted and the form "action" is actually the same page that the form is on, the php code then kicks in, does its thing, and your page is redirected with absolutely no header errors. It actually makes for cleaner looking code and it's easier to read and modify later if needed... it was for me anyway.
  21. How about this: use a javascript validation script, then once the form is complete and there are no validation errors do this: <?php if (isset($_POST['submit'])) { // If the form has been submitted. header("Location: securepage"); } ?> This wouldn't be very secure though because if the user typed the url of the "secure" page directly into the address bar of the browser, there would be no way to keep them from viewing the content unless you had a session logged or determine whether or not they are authorized to see the content based on page they came from. Hope this helps... I'm pretty new to php myself so I'm just throwing out ideas that I would try.
  22. If the user has to sign in, can you do something like this: <?php if ($_SESSION['logged'] == 1) { // User is already logged in. header("Location: secure.php"); // Goes to secure page. } else { header("Location: formpage.php"); // Goes back to form page. } ?>
  23. I have a site that I have the same information on several pages in different folders. Right now I have an include page in each folder and when I need to change the information on the include page, I have to do it for every folder, even though the information is all the same. What I need to do is have one include page that I can modify and all the other pages in the different folders can include it. I know I'm kind of rambling here but I hope I'm making sense. I need to know how to include a file from one folder into a page from another folder. Here's what I've tried so far and it didn't work... not sure what else to try. include("http://www.website.com/include.inc.php"); The file that I'm trying to include this into is located at http://www.website.com/folder1/page.php ... so include("include.inc.php") won't work... I have to specify what folder or directory to pull the include file from. Sorry about the rambling and thanks in advance for any help.
  24. I'm using a time stamp where I'm getting the date and time from the database server rather than using a unix time stamp. Because I'm in a different time zone as the server, my time was always off by 1 hour. I fixed that problem by writing some code to adjust the hour of the time and the date depending on what time it was. It was working fine until a few weeks ago when I had to adjust my clock for daylight savings time... now the time is off by 2 hours because of that. Well, I fixed that and now it's working fine again. My question is does anyone know of a way to automatically determine whether or not I should be in daylight savings time or not so I can just use an if/else statement to keep the time adjusted properly rather than having to do it manually every time the time changes? Basically, I would like to do it something like the following: <?php if ($daylightsavings = "y") { (adjust time/date for 1 hour difference); } else { (adjust time/date for 2 hour difference); } ?> Anyone have any ideas?
×
×
  • 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.