You’ve probably seen it or experienced at some point when registering for a site where you must pick a unique username or subdomain for account registration. However, this is can be tedious to implement in both frameworks and non-framework solutions. Luckily, Yii has validation rules that can be implemented easily [...]
Currently Browsing
Tutorials
Get Name of Current Controller and Action in Yii
This is a simple one line piece of code to retrieve the name of the current controller, which is great for making more generic and useful code. $controllerName = Yii::app()->controller->id;
Try Catch vs If…Which to use?
When it comes to error handling while coding there are several options available. We have if statements, try and catch, throw exceptions or even handle the it silently by logging or just letting it go. So to make it simple I’ve come down to this simple question: Do you know [...]
Using the Lookup Function In AMPScript
I would like to start by saying that AMPScript is a very powerful tool to use when creating dynamic emails within ExactTarget. It is well documented and has a diverse range of functionality to do the very simplest tasks to the most complex. One of the most common uses is [...]
Using The Lookup Function In Server-side Javascript
When using dynamic content within emails on the ExactTarget platform it is often useful to pull data from Data Extensions in order to populate content. Since the Retrieve function is not available within emails, therefore, developers are forced to use the Lookup function. At first glance, the ExactTarget wiki sample [...]
How To Display Hidden Characters In Vi
Many times it is very useful to see hidden characters in a text file and Vi is a simple tool to view/edit files. So here is the command to display hidden characters: :set list And then to turn them off: :set nolist
ExactTarget SOAP API Wrapper
Although having the ability to wrap the entire SOAP API would be nice I found it nearly impossible. However, I’ve made a simplified version that allows one to act on ExactTarget objects. It allows for Create, Update, Delete, Retrieve, and Upsert of an object. Again, it is simple but it [...]
Add An Item To An ExactTarget Portfolio VIA SOAP API Using PHP
This piece of code allows one to add a Portfolio item to an ExactTarget account.
Execute A Triggered Send With Additional Attributes Via SOAP API In ExactTarget Using PHP
This is an example of how to execute a triggered send within the ExactTarget platform. $wsdl = ‘https://webservice.exacttarget.com/etframework.wsdl’; try{ //Create the Soap Client $client = new ExactTargetSoapClient($wsdl, array(‘trace’=>1)); // Set username and password here $client->username = ‘username’; $client->password = ‘password’; //Define the subscriber $subscriber = new ExactTarget_Subscriber(); $subscriber->EmailAddress = ‘test@test.com’; [...]
Update A Query Activity In ExactTarget Via SOAP API In ExactTarget
try { $wsdl = ‘https://on.exacttarget.com/etframework.wsdl’; $client = new ExactTargetSoapClient($wsdl, array(‘trace’=>1)); $client->username = ‘username’; $client->password = ‘password’; //Define the query definition $query = new ExactTarget_QueryDefinition(); $query->ObjectID = ‘QueryID’; $sql = “SELECT TOP 10 FROM table”; $query->QueryText = $sql; //Set the targeted data extension $ibo = new ExactTarget_InteractionBaseObject(); $ibo->CustomerKey = ‘Target DE’; [...]