Infusionsoft_WebFormService::getHostedUrlFromHtml PHP Метод

getHostedUrlFromHtml() публичный статический Метод

public static getHostedUrlFromHtml ( $html, Infusionsoft_App $app = null ) : string
$html
$app Infusionsoft_App
Результат string
    public static function getHostedUrlFromHtml($html, Infusionsoft_App $app = null)
    {
        if ($app == null) {
            $app = parent::getObjectOrDefaultAppIfNull($app);
        }
        $search = $app->getHostname() . '/app/form/process/';
        // Find the start and stop position of the form GUID
        $start = strpos($html, $search) + strlen($search);
        $stop = strpos(substr($html, $start), '"');
        // Pull out the GUID
        $guid = substr($html, $start, $stop);
        // Put together the hosted URL
        $url = 'https://';
        $url .= $app->getHostname();
        $url .= '/app/form/' . $guid;
        return $url;
    }