Jump to content

The Letter E

Members
  • Posts

    266
  • Joined

  • Last visited

About The Letter E

  • Birthday 07/09/1987

Contact Methods

  • Website URL
    http://www.devlifeline.com

Profile Information

  • Gender
    Male

The Letter E's Achievements

Member

Member (2/5)

2

Reputation

  1. Just a note, as this may be your problem. In regexp "$" matches EOL (end of line), that means if you have multiple words you want to match in a single line it will not work. You may instead be looking for "\b" which is a word boundary character. A word boundary is usually triggered by a space or punctuation. I do agree with @Psycho on not using RegExp if it's not necessary. It's simply one of the many tools at our disposal and should be weighed against all other options before being selected as the right tool. However were I to use regex I would process against an entire paragraph, or block of text like this: preg_replace('/(\w+ss)\b/', '$1\'', $mytext); I hope this was helpful to the op or anyone else who comes across this thread. E
  2. You should consider a language that is better for high concurrency. With node.js you could process a large amount of the requests asynchronously as apposed to the synchronous downside of php. You may also find a service like IronMQ or RabbitMQ useful once you need to scale beyond your current means.
  3. Checkout Twitter Bootstrap and learn about how to create a responsive design. I'm not sure if this is the proper forum for your question though...
  4. Minify scripts and defer loading of js to the end of the page. http://www.devlifeline.com/2013/10/minified-css-and-deferred-js.html
  5. please share the output of: var_dump($_POST);
  6. if( preg_match('YOUR REGEXP HERE', $email_address) ){ //do redirect for custom page header('Location: '.$redirect_link); }else{ //do standard form processing } Above is the basic format that may work for you. You will however need to create the proper regular expression to catch each custom instance of an email address you want to redirect: see this link - http://www.regular-expressions.info/ or this one - http://gskinner.com/RegExr/ or this one - http://regexpal.com/ Reply if you need more help E
  7. Are you using the From: header? <?php mail('sendto@domain.com', 'Subject Line', 'Message...', 'From: sentfrom@domain.com'); ?>
  8. It seems you are trying to achieve a lookahead functionality. Perhaps you should consider using bootstrap: http://twitter.github.io/bootstrap/javascript.html#typeahead All the work is done for you and it works like a charm
  9. Well, I fell like a dumb. It seems that my hosting provider, Elastichost, initially blocks all communication from port 25 to keep users from creating spam accounts with their service. In order to get it lifted you have to agree to an anti spam terms of service. Here's their FAQ, in case anyone else is having a similar problem that seems unfixable: http://www.elastichosts.com/question/how-can-i-send-email-from-my-servers-can-you-lift-the-smtp-block/ Good Day E
  10. So, now I'm just trying to use, postfix, to keep you updated. Here's my new php.ini settings: sendmail_path = /usr/sbin/sendmail.postfix -t -i -f noreply@mysite.com I'm still getting similar errors with postfix: Jul 18 01:14:21 localhost postfix/master[6926]: terminating on signal 15 Jul 18 01:14:22 localhost postfix/postfix-script[7085]: starting the Postfix mail system Jul 18 01:14:22 localhost postfix/master[7086]: daemon started -- version 2.6.6, configuration /etc/postfix Jul 18 01:14:22 localhost postfix/qmgr[7089]: 02CB362D15: from=<noreply@mysite.com>, size=350, nrcpt=1 (queue active) Jul 18 01:14:22 localhost postfix/smtp[7091]: connect to aspmx.l.google.com[173.194.64.27]:25: Connection refused Jul 18 01:14:22 localhost postfix/smtp[7091]: connect to alt2.aspmx.l.google.com[173.194.74.27]:25: Connection refused Jul 18 01:14:22 localhost postfix/smtp[7091]: connect to alt1.aspmx.l.google.com[74.125.134.27]:25: Connection refused Jul 18 01:14:22 localhost postfix/smtp[7091]: connect to aspmx2.googlemail.com[74.125.140.27]:25: Connection refused Jul 18 01:14:22 localhost postfix/smtp[7091]: connect to aspmx3.googlemail.com[173.194.74.27]:25: Connection refused Jul 18 01:14:22 localhost postfix/smtp[7091]: 02CB362D15: to=<user@emailclient.com>, relay=none, delay=504, delays=503/0.03/0.27/0, dsn=4.4.1, status=deferred (connect to aspmx3.googlemail.com[173.194.74.27]:25: Connection refused) Please let me know if anything here rings a bell Thanks again, E
  11. Hi everybody, I've been working for hours trying to get the php mail() function working on my centOS box, with no luck I've installed postfix and set up configurations for postfix and sendmail and verified they are running. PHP successfully hands of the message to the servers mail queue for delivery, but I'm getting errors everytime in /var/log/maillog ERROR: Jul 18 00:33:44 localhost sendmail[5779]: r6I744do004573: to=<RECIPIENT_EMAIL>, ctladdr=<apache@localhost.localdomain> (48/48), delay=00:29:40, xdelay=00:00:00, mailer=esmtp, pri=300366, relay=aspmx2.googlemail.com., dsn=4.0.0, stat=Deferred: Connection refused by aspmx2.googlemail.com. Any help is much appreciated. I'd prefer not to reinstall the whole site on a ubuntu build just to avoid solving the current problem. Also, when I run: telnet aspmx2.google.com 25 I also get a connection refused response. I'm not sure if that's helpful... Thank you in advance! E
  12. If I was going to grab a bunch of data from a server that may or may not be reliable, since it's not my responsibility to manage its reliability, I would consider using an asynchronous call to grab said images. You could even implement some sort of lazy loading so you don't grab any images you don't need. Worst case if twitter bombs out on you, you have an entire website, minus some images from twitter. When you make an api call in the back end, things can become quite unpleasant, especially if you are not doing any sort of error handling around that twitter oauth lib. Nothing hurts my soul more than an Uncaught Exception, aka, the fatal error that got away.
  13. your theory seems logical mastubbs. order by date desc and don't forget a limit 1 in there, if you only want the most recent.
  14. Hey Everyone, I thought this would be a simple blur call, but it seems to have some unexpected behavior. So, we have a select box with a blur event, but the blur event fires only if you select an option from the list. Problem, if you click the <select> then click outside the list that pops up (making it dissappear) the select box stays focused...right? right. so, my question is, what's that event?? The event when you click away from the select list without actually blurring the <select>. Any help is appreciated. Thank You, E
  15. You can only select one option from a dropdown aka <select> box.
×
×
  • 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.