Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

When using a Fetch( )) function to retrieve the data from a url or other source, you can specify and filter results in your Interactions.

These functions can be naturally generated by the "Code Builder" in the Interactions Manager.

Basic Madl components used in the formatting or changing of fetched data in Interactions.


 

$t->trim( )

 This function will find removes white space off start and end of any data found in the fetch results.

Parameters   

 
 
None

Return Values   

 
$t->result
Returns page source or structured data / XML into variable $t 
$t->fetch("[http://blinkmobile.com.au/mobile-solutions/");]
$t->between("", "");

$t->trim();

return $t->result;

 

 

$t->preg_replace( )

 This function will find removes white space off start and end of any data found in the fetch results.

Parameters   

 
 
For more information on parameter see the php guide at [http://php.net/manual/en/function.preg-replace.php]  

Return Values   

 
$t->result
Returns page source or structured data / XML into variable $t  

 

 

 

$t->removeExtraSpaces( )

 

This function will find removes white space off start and end of any data found in the fetch results. Typically used with SMS functions in Madl..

 

Parameters   

 
 
None

 

 

 

Return Values   

 
$t->result
Returns page source or structured data / XML into variable $t 

 

 

 

$t->fetch("[http://blinkmobile.com.au/mobile-solutions/");]
$t->between("", "");

$t->removeExtraSpaces();

return $t->result;

 

 

 

$t->removeNewlines( )

 

This function will remove all instances of the following characters in the fetch results. Common use is for removing returns from fetch results to assist with

displaying data in containers without spaces. "\t" "\n" "\r" "\x20\x20" "\0" "\x0B"

Parameters   

 
 
None

 

Return Values   

 
$t->result
Returns page source or structured data / XML into variable $t 

 

$t->fetch("[http://blinkmobile.com.au/mobile-solutions/");]
$t->between("", "");

$t->removeNewlines();

return $t->result;

 

 

 

 

 

 

$t->removeTags( )

 

This function will remove all HTML tags s in the fetch results. Common use is for removing <p> <a> tags from fetch results to assist with displaying data in containers.

  

Parameters   

 
 $allowable_tagsOptional $allowable_tags parameter lets you specify the tags you do not want to remove.

 

 

Return Values   

 
$t->result
Returns page source or structured data / XML into variable $t 
 

 

 
$t->fetch("[http://blinkmobile.com.au/mobile-solutions/");]
$t->between("", "");

$t->removeTags ( string $str [, string $allowable_tags ] ) 

return $t->result;
 

 

 

 

 

$t->replace( )

This function will find and replace any data found in the fetch results. Common use is for replacing results be it text, images or HTML tags to assist with displaying data.

Parameters   

 
 
None

Return Values   

 
$t->result
Returns page source or structured data / XML into variable $t 
$t->fetch("[http://blinkmobile.com.au/mobile-solutions/");]
$t->replace("
For information about things for visitors to see and do in and around Brisbane, visit:
","");

return $t->result;

 

 

 

 

 


 


  • No labels