Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameters   

An array of options including the following.
$urlA String containing the requested URL.
$postAn Array or String containing post data or array.
$headers

An Array or String containing page header type.

$referer An Array or String containing url or page to re-direct to.
$header_in_output=falseA boolean value that defines if the header is included in the output.
$timeout_second=30a numeric value for CURLOPT_CONNECTTIMEOUT.
$curlOpts = array()

key-value pair for curl options

Return

...

Values   

 
$t->result
A String.
All results from $t->fetch are stored in $t->result.Used for performing HTTP connections. Fetch is a wrapper for the PHP cURL function. 


Code Block
themeRDark
languagephp
title$t->Fetch() Simple Example
linenumberstrue
collapsetrue
$t->fetch("[http://blinkmobile.com.au/");] \\
return $t->result;

...

Code Block
themeRDark
languagephp
title Example
linenumberstrue
$t->fetch("http://blinkmobile.com.au/"); 
if($t->contains("Logged Successful")){
// do something
}
// read more data from scrap
$t->refresh( );
return $t->result;

Return

...

Values   

 
$t->result
A String.
 Returns the last requested source into $t->result

 


 

$t->submitForm( )

Often known as a "PassThru"... On occasions when you are retrieving a page source into an Interaction you may require authorisation from a login form.

...

Parameters   

 
$mystring
A String. The reference to the form name. 0 can be used instead to select the first form found, 1 then next and so on.
$myarray
As Array of values to be passed to the form.

Return

...

Values   

 
$t->result
A String.
Returns requested source into $t->result
Code Block
themeRDark
languagephp
title Example
linenumberstrue
$t->fetch("[http://support.blinkmobile.com.au/");] 


 $t->submitForm( 0,
    array(
    'username'=>'YourUserName',
    'passwd'=>'YourPassword'
    )
);
return $t->result;

// Page source returned here for additional processing

...