# final class \SmartRobot
{ } ::

Class: SmartRobot - Easy to use HTTP Robot.

- Language: PHP
- Located at: lib/core/plugins/lib_robot.php
- Package: Application:Plugins:Network:HTTP
- Namespace: \
- Class Name: SmartRobot
- Version: v.20240119
- Depends: classes: SmartUnicode, Smart, SmartDetectImages, SmartUtils, SmartEnvironment, SmartFrameworkSecurity, SmartFrameworkRegistry
- Usage: static object: Class::method() - This class provides only STATIC methods

## 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: 2024-12-16 16:53:45 +0000

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