Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

CURL.GetEffectiveURL

Get the last used effective URL.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
CURL 2.5 Yes Yes Yes Yes Yes

MBS( "CURL.GetEffectiveURL"; Handle )

Parameters

Parameter Description Example value
Handle The CURL session handle. $curl

Result

Returns the requested value or nothing on error.

Description

Get the last used effective URL.

Examples

Follow redirection and get effective URL:

#Start new session
Set Variable [$curl; Value:MBS("CURL.New")]
#Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
Set Variable [$result; Value:MBS("CURL.SetOptionURL"; $curl; CURL Test::URL)]
Set Variable [$result; Value:MBS("CURL.SetOptionFollowLocation"; $curl; 1)]
Set Variable [$result; Value:MBS("CURL.SetOptionMaxRedirs"; $curl; 3)]
#RUN now
Set Field [CURL Test::Result; MBS("CURL.Perform"; $curl)]
#Check result
Set Field [CURL Test::Text; MBS("CURL.GetResultAsText"; $curl; "UTF8")]
Set Field [CURL Test::newURL; MBS("CURL.GetEffectiveURL"; $curl)]
Set Field [CURL Test::debug; MBS("CURL.GetDebugAsText"; $curl)]
#Cleanup
Set Variable [$result; Value:MBS("CURL.Cleanup"; $curl)]

See also

Example Databases


CURL.GetDebugWithTime   -   CURL.GetFTPEntryPath

Feedback: Report problem or ask question.




Links
MBS FileMaker tutorial videos