Tag Archive | "php"

Load Your Model With Data in CodeIgniter


Much like fashion models, it seems that managing CodeIgniter models can be a little tricky. I always ended up with a massive pile of set_value() calls for each of the elements I wanted to load in. In order to ‘bosh this, I wrote this function to do it automagically.

It will grab all the variables you’ve declared for the model, then try to load them up with submitted data. Nifty.

function load_model() {
     $vars = get_class_vars(get_class($this));
     unset($vars['_parent_name']);
     foreach($vars as $key => $value) {
          $this->$key = $this->input->post($key);
     }
}

Posted in CodeComments (0)

Validate Phone Numbers in CodeIgniter


The Form Validation class in CodeIgniter does a lot of fantastic things. Validating phone numbers isn’t one of them. Here is a script I’ve paraphrased to take in almost any format of U.S. phone number and use regular expressions to return it like this: (555) 555-1212.

function _validate_phone_number($value) {
	$value = trim($value);
	$match = '/^\(?[0-9]{3}\)?[-. ]?[0-9]{3}[-. ]?[0-9]{4}$/';
	$replace = '/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/';
	$return = '($1) $2-$3';
    if (preg_match($match, $value)) {
    	return preg_replace($replace, $return, $value);
    } else {
    	$this->form_validation->set_message('_validate_phone_number', 'Invalid Phone.');
	return false;
    }
}

Posted in CodeComments (0)

Using Flash To Play With Images (AS3 + PHP)


Using Flash to get an image and play with it is a bit more complicated than it looks. The reason is that you can’t take an image from your hard drive and drop it directly into the Flash Player because the Flash Player doesn’t have permission to read data from your machine. The only way to get an image from your local drive into Flash is to first upload it to the server, then re-download it. Here’s a drawring.

I know, it’s the definition of circuitous, but thems the breaks. So we need to write two bits, the Flash (we will use AS3) to run on the client, and the PHP to run on the server. One note before we begin: Due to Flash’s sandbox restrictions, this is most easily tested in a live environment. I’ve had a lot of trouble testing locally.

Firstly, let’s talk Flash upload. The main class we will use for uploading is the FileReference class. This class allows us to upload and download files using Flash.

private var myFileRef:FileReference = new FileReference();

The only mission critical function call is the browse() function. We apply a file filter to prevent Flash from sending us anything but an image. This is only client side validation, so stronger measure are required server side.

var formats:String = "All Formats (*.jpg,*.gif,*.png)", "*.jpg;*.gif;*.png;", "JPEG;jp2_;GIFF";
this.myFileRef.browse([new FileFilter(formats)]);

That alone will bring up our old friend the browse window for your local machine. Now it’s a matter for the event listeners. By attaching them to the FileReference object, we monitor events like Event.SELECT (which occurs when the user picks a file and hits select, or Event.CANCEL which is called if the user hits cancel. Here are all the events you might listen for:

myFileRef.addEventListener(Event.SELECT, this.selectFile);
myFileRef.addEventListener(Event.OPEN, this.openFile);
myFileRef.addEventListener(HTTPStatusEvent.HTTP_STATUS, this.httpStatus);
myFileRef.addEventListener(Event.COMPLETE, this.completeUpload);
myFileRef.addEventListener(SecurityErrorEvent.SECURITY_ERROR, this.securityError);
myFileRef.addEventListener(IOErrorEvent.IO_ERROR, this.ioError);
myFileRef.addEventListener(Event.CANCEL, this.cancel);
myFileRef.addEventListener(ProgressEvent.PROGRESS, this.uploadProgress);
myFileRef.addEventListener(DataEvent.UPLOAD_COMPLETE_DATA, this.uploadComplete);

So when the SELECT event fires, this handler takes care of it:

function selectFile(e:Event):void {
	myFileRef.upload(uploadURL);		
}

Where uploadURL is the address of the PHP script we will setup to receive the upload as a POST variable. So, what we’ve got so far is the equivalent of a file post form element in html. It took us a while to get there, but it gave us finer grain control. Now we need the PHP script to accept the data and turn it into a file.

if (isAllowedExtension($_FILES['Filedata']['name'])) {
	// Path to storage
	$storage = 'flash_uploads';
 
	// Create a random for file
	$newRandName = time().rand();
	$newRandFile = $newRandName.".".findExtension($_FILES['Filedata']['name']); 
	$uploadfile = $storage . "/" . $newRandFile;
 
	// Try to move the uploaded file into permanent storage
	if ( move_uploaded_file( $_FILES['Filedata']['tmp_name'] , $uploadfile ) ) {
		echo($newRandFile); // Return the name of the file
	} else { // If the move failed
		echo( '0'); // Return 0 as an error code
	}
}
// Extract the file extension from the filename
function findExtension ($filename) { 
	$filename = strtolower($filename) ; 
	$exts = split("[/\\.]", $filename) ; 
	$n = count($exts)-1; 
	$exts = $exts[$n]; 
	return $exts; 
} 
// Check to make sure the file extension is valid
function isAllowedExtension($fileName) {
	$allowedExtensions = array("gif", "jpg", "jpeg", "png");
	return in_array(end(explode(".", $fileName)), $allowedExtensions);
}

Since the Flash used regular old POST to upload the file, the result is of course is the return page. We use this to inform the Flash about what happened. In the event of a failure the Flash will receive an error code, but if things go well, the Flash will receive the name of the newly created file on the server. We must now download it with a standard Loader.

var photoloader = new Loader();
var loadRequest = new URLRequest (baseurl+"/flash_uploads/"+serverFileName);
photoloader.load(loadRequest);
photoloader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
 
function onLoadComplete(event:Event):void {
	stage.addChild(photoloader);
}

where serverFileName is the name of the file returned by the server, and baseurl is the url of the server on which our new file can be found. Our new loader is then added to the stage, where we can play with it. Remember this process can accumulate files on the server, so you might want to do a bit of clean up as well.

Posted in CodeComments (2)

Creating a Character Sequence In PHP


Note: Before you read this, read the edit at the bottom.

Recently I needed to created a character sequence in PHP like this: aa, ab, ac and so forth. The range() function can’t handle multiple characters, so I wrote a function to generate the next string in the sequence based on the string sent in. The function “carries the one”, so to speak, meaning the next string after az is ba. After zz comes aa again. You can use any amount of characters, so aaaa will yield aaab.

function get_next_in_sequence($str) {
	$letters = range('a', 'z');
	$arr = str_split($str);
	// Replace each character with numeric equivalent
	foreach ($arr as $key => $char) {
		$arr[$key] = array_search($char, $letters); 
	}
	$digits = count($arr)-1; // Count digits
	for ($i=$digits; $i > -1; $i--) { // Starting at the right-most spot, move left
		if ($i == $digits) // If this is the right most spot
			$arr[$i]++; // Increment it
		if ($arr[$i] == 26) { // If this spot has moved past "z"
			$arr[$i] = 0;	// Set it to "a"
			if ($i != 0) // Unless it is the left most spot
				$arr[$i-1]++;  // Carry the one to the next spot
		} 
	}
	// Rebuild characters from numeric equivalent
	foreach ($arr as $key => $char) { 
		$arr[$key] = $letters[$char];
	}
	$str = implode($arr);
	return $str;
}

CRUTIAL EDIT:

Thanks to a helpful comment from Daniel, it has been brought to my attention that this is now unnecessary. Use this instead:

http://php.net/language.operators.increment.php

Thanks Daniel!

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