Smart.Framework Logo

final class \SmartRobot
{ } ::

Class: SmartRobot - Easy to use HTTP Robot.


class Methods

public static function load_url_img_content ( string $y_img_link, string $y_allow_set_credentials = "no" ) {} :: ARRAY
@return: {ARRAY}
@param: {STRING} $y_img_link: relative/path/to/image (assumes current URL as prefix) | http(s)://some.url:port/path/to/image (port is optional) ; works also with Data-URL (Data-Image only)
@param: {YES/NO} $y_allow_set_credentials: DEFAULT IS SET to NO ; if YES must be set just for internal URLs ; if set to AUTO will try to detect if can trust based on task.php / admin.php / index.php local framework scripts ; if the $y_url_or_path to get is detected to be under current URL will send also the Unique / session IDs ; more if detected that is from task.php / admin.php and if this is set to YES will send the HTTP-BASIC Auth credentials if detected (using YES with other URLs than Smart.Framework's current URL can be a serious SECURITY ISSUE, so don't !)
Load URL IMG (svg / png / gif / jpg / webp) Content (if relative path to a file will be prefixed with current URL for security reasons)
public static function load_url_content ( string $y_url_or_path, int $y_timeout = 30, string $y_method = "GET", string $y_ssl_method = "", string $y_auth_name = "", string $y_auth_pass = "", string $y_allow_set_credentials = "no", int $y_allow_num_redirects = 2 ) {} :: ARRAY
@return: {ARRAY}
@param: {STRING} $y_url_or_path: relative/path/to/file (assumes current URL as prefix) | http(s)://some.url:port/path (port is optional) ; works also with Data-URL (Data-Image only)
@param: {NUMBER} $y_timeout: timeout in seconds
@param: {ENUM} $y_method: used only for URLs, the browsing method: GET | POST
@param: {ENUM} $y_ssl_method: SSL Mode: '' (default) ; or specific: 'tls' | 'tls:1.1' | 'tls:1.2' | 'tls:1.3'
@param: {STRING} $y_auth_name: used only for URLs, the auth user name
@param: {STRING} $y_auth_pass: used only for URLs, the auth password
@param: {YES/NO} $y_allow_set_credentials: DEFAULT IS SET to NO ; if YES must be set just for internal URLs ; if set to AUTO will try to detect if can trust based on task.php / admin.php / index.php local framework scripts ; if the $y_url_or_path to get is detected to be under current URL will send also the Unique / session IDs ; more if detected that is from task.php / admin.php and if this is set to YES will send the HTTP-BASIC Auth credentials if detected (using YES with other URLs than Smart.Framework's current URL can be a serious SECURITY ISSUE, so don't !)
@param: {BOOL} $y_allow_num_redirects: DEFAULT IS SET to 2 ; Between 0..10 ; if > 0 will allow this number of redirects if 301/302, but only if not set to send any auth username/pass/credentials to avoid security leaks) ; if 0 will allow no redirects
Load URL Content (if relative path to a file will be prefixed with current URL for security reasons)

class Properties


class Constants



documentation generated on: 2023-10-19 23:15:51 +0000


Smart.Framework © 2009-2023 unix-world.org