TURL_SetUserAgent |
Sets a custom text to be used for the name of the user agent requesting the information. The user agent can be set to the name of a popular browser, so that unwanted redirects don’t occur.
Syntax
TURL_SetUserAgent ( switches ; userAgentText )
Parameters
switches | not used, reserved for future use. Leave blank or put "-unused" |
userAgentText | the user agent text |
Returned Result
Data type returned
Error code
Result
If successful this function returns 0. If unsuccessful it returns an error code starting with $$ followed by the error code.
At the moment this function does not return errors.
Originated in
Troi URL Plug-in 1.2
Compatibility
FileMaker Pro 16 to 19
Considerations
The text is remembered until you specify a different text. The text is also removed when you quit FileMaker Pro. The maximum length of the userAgentText is 1Gb.
If you don’t specify a user agent text the plug-in will use a default of “Troi URL Plug-In 5.0 (Windows)” or “Troi URL Plug-In 5.0 (Macintosh; Mach-O)” respectively.
If you specify an empty string the default text will be used.
Example
TURL_SetUserAgent ( "-unused" ; "Mozilla/5.0 (compatible; MSIE 10.0;
Windows NT 6.2; Trident/6.0 ) " )
This pretends this is Internet Explorer 10 on Windows.
TURL_SetUserAgent ( "-unused" ; "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6)
AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15" )
This pretends this is Safari on macOS.
Related topics
Troi URL Plug-in online help (overview)