When using a Fetch( )) function to retrieve the data from a url or other source, you can specify and filter results in your Interactions.
...
$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_tags | Optional $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 |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$t->fetch("[http://blinkmobile.com.au/mobile-solutions/");] $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 | |
---|---|
$search | String. Required. Specifies the value to find |
$replace | String. Required. Specifies the value to replace the value in find |
Return Values | |
---|---|
$t->result | Returns page source or structured data / XML into variable $t |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$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; |
$t->str_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 | |
---|---|
$search | String. Required. Specifies the value to find |
$replace | String. Required. Specifies the value to replace the value in find |
Return Values | |
---|---|
$t->result | Returns page source or structured data / XML into variable $t |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$t->fetch("[http://blinkmobile.com.au/mobile-solutions/");] $t->str_replace("Experience Brisbane",""); return $t->result; |
$t->ucwirds( )
Returns a string with the first character of each word in str capitalised, if that character is alphabetic.
Parameters | |
---|---|
None |
Return Values | |
---|---|
$t->result | Returns page source or structured data / XML into variable $t |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$t->fetch("[http://blinkmobile.com.au/mobile-solutions/");] $t->ucwords(); return $t->result; |
...
$t->resolveurls( )
Resolves any urls found in the fetch results.
Parameters | |
---|---|
None |
Return Values | |
---|---|
$t->result | Returns page source or structured data / XML into variable $t |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$t->fetch("[http://blinkmobile.com.au/mobile-solutions/");] $t->resolveurls(); return $t->result; |
$t->header( )
Introduced in the April 2013 release BMP Sand Box of client code.
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 | |
---|---|
$search | String. Required. Specifies the value to find |
$replace | String. Required. Specifies the value to replace the value in find |
Return Values | |
---|---|
$t->result | Returns page source or structured data / XML into variable $t |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
$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; |