public function getPublisherHTML($config = array())
    {
    // Initialize.
        $session_secret = "";
        $fields = array('config' => $config);
        $webservice_url = '/ws/setruntimeoptions/' . $this->publisherKey;

        // If necessary, process the config data.
        if ( ! empty($config))
        {
            // Add the gameid to the options url.
            if (array_key_exists("gameid", $config))
            {
                $webservice_url .= '/' . $config['gameid'];
            }
        }

        // Call the webservice and get the response.
        $resp = $this->doHttpsPostReturnJSONArray($this->webService, $webservice_url, $fields);
        if ($resp)
        {
            // Get the session secret from the response.
            $session_secret = $resp->session_secret;

            // Build the url to the AYAH webservice.
            $url = 'https://';                      // The AYAH webservice API requires https.
            $url.= $this->webService;               // Add the host.
            $url.= "/ws/script/";                       // Add the path to the API script.
            $url.= urlencode($this->publisherKey);          // Add the encoded publisher key.
            $url.= (empty($session_secret))? "" : "/".$session_secret;  // If set, add the session_secret.

            // Build and return the needed HTML code.
            return "<div id='AYAH'></div><script src='". $url ."' type='text/javascript' language='JavaScript'></script>";
        }
        else
        {
            // Build and log a detailed message.
            $url = "https://".$this->webService.$webservice_url;
            $message = "Unable to connect to the AYAH webservice server.  url='$url'";

            // Build and display a helpful message to the site user.
            $style = "padding: 10px; border: 1px solid #EED3D7; background: #F2DEDE; color: #B94A48;";
            $message = "Unable to load the <i>Are You a Human</i> PlayThru&trade;.  Please contact the site owner to report the problem.";
            echo "<p style=\"$style\">$message</p>\n";
        }
    }
public function getPublisherHTML($config = array())
    {
    // Initialize.
        $session_secret = "";
        $fields = array('config' => $config);
        $webservice_url = '/ws/setruntimeoptions/' . $this->publisherKey;

        // If necessary, process the config data.
        if ( ! empty($config))
        {
            // Add the gameid to the options url.
            if (array_key_exists("gameid", $config))
            {
                $webservice_url .= '/' . $config['gameid'];
            }
        }

        // Call the webservice and get the response.
        $resp = $this->doHttpsPostReturnJSONArray($this->webService, $webservice_url, $fields);
        if ($resp)
        {
            // Get the session secret from the response.
            $session_secret = $resp->session_secret;

            // Build the url to the AYAH webservice.
            $url = 'https://';                      // The AYAH webservice API requires https.
            $url.= $this->webService;               // Add the host.
            $url.= "/ws/script/";                       // Add the path to the API script.
            $url.= urlencode($this->publisherKey);          // Add the encoded publisher key.
            $url.= (empty($session_secret))? "" : "/".$session_secret;  // If set, add the session_secret.

            // Build and return the needed HTML code.
            return "<div id='AYAH'></div><script src='". $url ."' type='text/javascript' language='JavaScript'></script>";
        }
        else
        {
            // Build and log a detailed message.
            $url = "https://".$this->webService.$webservice_url;
            $message = "Unable to connect to the AYAH webservice server.  url='$url'";

            // Build and display a helpful message to the site user.
            $style = "padding: 10px; border: 1px solid #EED3D7; background: #F2DEDE; color: #B94A48;";
            $message = "Unable to load the <i>Are You a Human</i> PlayThru&trade;.  Please contact the site owner to report the problem.";
            echo "<p style=\"$style\">$message</p>\n";
        }
    }
public function getPublisherHTML ( $ config = array ( ) ) { // Initialize. $ session_secret = "" ; $ fields = array ( 'config' => $ config ) ; $ webservice_url = '/ws/setruntimeoptions/' . $ this -> publisherKey ; // If necessary, process the config data. if ( ! empty ( $ config ) ) { // Add the gameid to the options url. if ( array_key_exists ( "gameid" , $ config ) ) { $ webservice_url .= '/' . $ config [ 'gameid' ] ; } } // Call the webservice and get the response. $ resp = $ this -> doHttpsPostReturnJSONArray ( $ this -> webService , $ webservice_url , $ fields ) ; if ( $ resp ) { // Get the session secret from the response. $ session_secret = $ resp -> session_secret ; // Build the url to the AYAH webservice. $ url = 'https://' ; // The AYAH webservice API requires https. $ url .= $ this -> webService ; // Add the host. $ url .= "/ws/script/" ; // Add the path to the API script. $ url .= urlencode ( $ this -> publisherKey ) ; // Add the encoded publisher key. $ url .= ( empty ( $ session_secret ) ) ? "" : "/" . $ session_secret ; // If set, add the session_secret. // Build and return the needed HTML code. return "<div id='AYAH'></div><script src='" . $ url . "' type='text/javascript' language='JavaScript'></script>" ; } else { // Build and log a detailed message. $ url = "https://" . $ this -> webService . $ webservice_url ; $ message = "Unable to connect to the AYAH webservice server.  url='$url'" ; // Build and display a helpful message to the site user. $ style = "padding: 10px; border: 1px solid #EED3D7; background: #F2DEDE; color: #B94A48;" ; $ message = "Unable to load the <i>Are You a Human</i> PlayThru&trade;.  Please contact the site owner to report the problem." ; echo "<p style=\"$style\">$message</p>\n" ; } }
Returns the markup for PlayThru.=
@param array $config
@return string
Returns the markup for PlayThru . =