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
Php
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’; [...]
Create 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->Name = “Test Query”; $query->CustomerKey = “TestQuery”; $query->Description = “Test Query Description”; $query->TargetUpdateType = “Overwrite”; $query->TargetType = “DE”; $query->QueryText = “SELECT * FROM table”; //Set the [...]
Microgroove API Wrapper For PHP
API wrappers are nectar of the gods for programmers. Here is yet another one this time for the Microgroove API. Go get you some code! Feel free to advance the code. Remember, it is all open source right?
Retrieve Folder ID Via SOAP API In ExactTarget Using PHP
try{ $wsdl = ‘https://on.exacttarget.com/etframework.wsdl’; //Create the Soap Client $client = new ExactTargetSoapClient($wsdl, array(‘trace’=>1)); //Set the username and password $client->username = ‘username’; $client->password = ‘password’; //First find the parent folder $filter = new ExactTarget_SimpleFilterPart(); $filter->Property = “Name”; $filter->SimpleOperator = ExactTarget_SimpleOperators::equals; $filter->Value = array(‘Data Extensions’); //Other possibilities include Emails, or any [...]
Create Content Area Via SOAP API In ExactTarget Using PHP
try { $wsdl = ‘https://on.exacttarget.com/etframework.wsdl’; $client = new ExactTargetSoapClient($wsdl, array(‘trace’=>1)); $client->username = ‘username’; $client->password = ‘password’; $content_area = new ExactTarget_ContentArea(); $content_area->Name = ‘My Example Content Area’; $content_area->Content = ‘Hello World’; $content_area = new SoapVar($content_area, SOAP_ENC_OBJECT, ‘ContentArea’, “http://exacttarget.com/wsdl/partnerAPI”); //Setup and execute the request $request = new ExactTarget_CreateRequest(); $request->Objects = $content_area; $request->Options [...]
Execute Complex Filter Via SOAP API In ExactTarget Using PHP
$wsdl = ‘https://webservice.exacttarget.com/etframework.wsdl’; /* Create the Soap Client */ $client = new ExactTargetSoapClient($wsdl, array(‘trace’=>1)); /* Set username and password here */ $client->username = ‘username’; $client->password = ‘password’; $rr = new ExactTarget_RetrieveRequest(); $rr->ObjectType = “DataExtensionObject[ExampleDE]“; // ExampleDE is the name of the data extension $rr->Properties = array(); $rr->Properties[] = “SubscriberKey”;//Field you [...]