Updates from January, 2005 Toggle Comment Threads | Keyboard Shortcuts

  • wade 6:41 on Monday, 31 January 2005 Permalink | Log in to leave a Comment  

    New features, tools, or services? What do you want? 

    With the anticipated upgrade of a new server and the hope that we can continue to increase our range of resources and usefulness, we would also like to poll our members regarding additional features and tools that may be of use to them. A few have mentioned bulletin boards in the past, paste bins, php.net mirrors, project archives among other things. What about services such as our library and the relationships that we have with publishers? What about our monthly presentations? audio and video? streaming? We have also talked repeatedly over the years about collaborating on a project. Is there still interest in that? Who’s willing? (Post your name and level of interest as a comment to this article.) What would you be interested in working on? Even if it’s far fetched, we would love to know what you are interested in or what could help you.

  • wade 6:24 on Monday, 31 January 2005 Permalink | Log in to leave a Comment  

    Donations requested to keep UPHPU online 

    As noted in an article posted by Mac just last week, our group has grown significantly recently as we are fast becoming a premier resource for PHP and general web development not only in Utah but throughout the world. We are well over 200 members in number now. With this success however, we are increasing our bandwidth and services, all items that are paid by someone whether via donations or direct cost. We would like to resolve our transient status once and for all, plan for the future, and establish a home that has room to grow.

    As most of you are aware, the Utah PHP Users Group outgrew it’s home on the internet last fall and undertook an effort to acquire a new server by means of donations from our members. Surprisingly, however, one of our own stepped up with a much larger donation, offering the group an entire server, rack space, and bandwidth all at once. Thus seemingly ending the need for donations, we moved to this new server without further petition and were happily there for the next couple of months. Unfortunately, this favor soon became unavailable and we were forced to move again. Luckily, another member stepped up immediately and offered to configure an old, unused server laying around his office for us to share, providing a quick solution to our problem.

    With the other favors however, this situation has unfortunately also become unavailable, leaving us once again looking for a new home. As was the feelings in September, yet much stronger and urgent now, we believe that the Utah PHP Users Group needs a permanent home. There are many that have offered and are currently willing to donate space on servers and personal bandwidth but it is important to remember that nothing comes for free. There is always someone, somewhere paying the bill.

    The web-a-thon that we held in September sadly only resulted $20 from two donations. Although this is a start, we will need much more to keep UPHPU online, at least without interruption. So, we are officially requesting that each individual that has benefitted from the group support the future of the organization by donating $10 dollars. This money will be used to purchase our new server and pay for bandwidth. XMission has already agreed to donate the necessary rack space.

    We would like to once again offer sincere thanks to each individual and organization that has assisted us in the past, including Matt Fredricko at Hosting Inferno, and Fred Larsen. Each person that offered hosting, spent time configuring the server, and donated have been paramount to our existence and growth.

    We are an entirely volunteer organization, supported and run by a group individuals dedicated and passionate to supporting the cause. This incredible resource and service is ours because of the generosity of every member’s time and talents. Because of this, we have an excellent list of services available to offer our community that we would like to remind you of. From our interactive website, mailing lists, RSS feeds, a library of free books, training and information seminars, and visibility for employers, this is definitely a significant value and something to be part of.

    So, please take a moment to send in your donation and notes of any other ways in which you are interested in supporting or assisting the group. Donations can be submitted via PayPal (address at bottom of page) or a mailing address for personal checks can be obtained by contacting the group administrator. Thank you!

  • wade 16:45 on Friday, 28 January 2005 Permalink | Log in to leave a Comment  

    New user accounts lost, please reregister 

    We are sorry to report, but an error occured during an upgrade to the system this morning and we lost some data. We were forced to roll the system back to an archive from two weeks ago. Although we have been able to recreate nearly every change or addition since then, a few comments and all new users accounts are missing. Thus, we will have to ask all new users that registered accounts since 14 January 2005, to reregister. We apologize for the inconvenience.

  • wade 16:30 on Tuesday, 18 January 2005 Permalink | Log in to leave a Comment  

    Strings and regular expressions in PHP 

    Mac Newbold presented on strings in PHP, including: regular expressions (PCRE, POSIX), code execution/speed, working with html/databases/etc., and a review of various string processing functions.

    Due to some technical difficulties, the audio recording of the meeting will not be available after all. The meeting notes are available in Microsoft PowerPoint (PPT) format, plain text, and HTML.

  • macnewbold 22:25 on Thursday, 6 January 2005 Permalink | Log in to leave a Comment  

    Verifying email addresses in PHP 

    A recent discussion in the UPHPU IRC channel (#uphpu on freenode.net) prompted me to submit something I use for validating email addresses. There’s only so much you can do without actually sending a message, but this code uses three steps to check the address.

    First, it checks it with a regular expression, to verify that it uses valid characters for the various parts of the address, and there is an @ and at least one period, and they’re in the right places. Second, it turns to DNS to verify that the domain exists. (DNS calls will probably need tweaking to work on Windows servers.) Best case is that it has an MX record for the domain. Second best is to verify that the domain simply exists and has an address. If it can pass the regular expression test and the DNS test, then it is most likely a valid address. The things we can’t easily check are user-related, like user doesn’t exist, has exceeded quota, etc.

    In places where I’ve done comparisons with and without this checking in place, I’ve found very significant reductions (probably around 80%) in the number of bounced messages. While this can be used just before sending, it’s often best to use it when accepting the email address from the user, to prevent bad addresses from getting into the system in the first place, and catch typographical errors. In cases where a long time has passed since the email was known to work, it may be helpful to check before sending the message as well.

    function ValidateEmail($e,$v=-1)
    	global $verbose;
    	/*	Return codes:
       	0: appears to be a valid email
       	1: didn't match pattern of a valid email
       	2: looks valid by the pattern, but no DNS records found
      		Try several things to make sure it is most likely valid:
       	1. preg_match it to make sure it looks valid
       	2a. If that passes, check for an MX entry for the domain
       	2b. If no MX, check for any DNS entry for the domain
    	if ($v==-1)
    	if (!preg_match("/^[a-z0-9.+-_]+@([a-z0-9-]+(.[a-z0-9-]+)+)$/i",
    		$e, $grab))
    		return 1;
    	# $grab[0] is the whole address
    	# $grab[1] is the domain
    	$domain = $grab[1];
    	$cmds = array("host -t MX $domain 2>&1 ","host $domain 2>&1 ");
    	foreach ($cmds as $cmd)
    		$dns = trim(`$cmd`);
    		if ($v)
    			print "n";
    		if (strpos($dns,"$domain mail is handled ")!==false || 
    			strpos($dns,"$domain has address ")!==false ||
    			strpos($dns,"$domain is an alias ")!==false)
    			# It is valid
    			return 0;
    	# If it didn't return yet, it's invalid, even
    	# though it passed the preg.
    	return 2;

    Questions, comments, and suggestions are welcome.

    - Mac

compose new post
next post/next comment
previous post/previous comment
show/hide comments
go to top
go to login
show/hide help
shift + esc