Server Side Embedding


What is Server Side Embedding?

Server side embedding is a method of serving customized web content, via the server, and server language, as opposed to the client side.

Benefits: SEO and Social Sharing

Server side embedding (SSE) is recommended for websites that are extremely serious about SEO (Search Engine Optimization) and social sharing.   SSE helps to make your events discoverable on search engines.

If your hosting is relatively fast and if you are technical enough to work through some compatibility issues (such as organising the page, resolving conflicts with plugins, javascript, or CSS), server side embedding is your best choice.  SSE is generally the best choice for large-scale websites.

If you do not have fast hosting, and don’t place a huge focus on SEO it is better to embed your calendar via the widget code from the embed tab.

Note: SSE may cause problems and slow down your website if communication between the servers is slow.

How it Works:

For Server side embedding to work, you will have to edit your site source file (PHP, ASP, etc) and make it pull data from our server and display on your website.

Basically what you have to do is to pull data from the following URL and show it on your website:

As YOUR_WEBSITE_URL and FULL_QUERY_STRING can/will be dynamic, it is better to let your language of choice (PHP, ASP, etc) return those values for you.

We recommend you to enable the GZIP compression when pulling the calendar source code.

If you use PHP, a code example would be (replace the $calendar value with your calendar URL):

<h1>My Calendar</h1>
$calendar = “”;
$requestUri = str_replace( ‘?’, ‘&’, $_SERVER[REQUEST_URI] );
$url = “$calendar?sse=” . ( isset( $_SERVER[‘HTTPS’] ) ? ‘https’ : ‘http’ ) . “://$_SERVER[HTTP_HOST]$requestUri”;
$curl = curl_init( $url );
curl_setopt( $curl, CURLOPT_ENCODING , “gzip” );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, false );
curl_setopt( $curl, CURLOPT_CONNECTTIMEOUT, 60 );
curl_exec( $curl );
curl_close( $curl );

Getting Your SSE Code:

Server Side Embed Code

Pasting Your Embed Code:

Be aware that this is server side code (in this case, it’s PHP), so the code will need to be placed in a PHP file, then uploaded to your website via an FTP program, or through a File Manager program such as the one available in Cpanel.

Embedding Into a WordPress Page:

If you are using WordPress you can use a 3rd party plugin that allows you to paste PHP code into your Pages, such as “PHP Code Snippet.”

Here’s an example of inserting your SSE code into a snippet using this plugin.  Click on “Add PHP Snippet”:

Paste your embed code, then click on the Create button.

Once you’ve created the code snippet, you simply display your calendar by pasting the associated shortcode on any Post or Page.

Adding the Snippet:

Add the Snippet[/vc_column_text][vc_row_inner][vc_column_inner][/vc_column_inner][/vc_row_inner][/vc_column][/vc_row][/vc_section]

Leave a Comment

Your email address will not be published. Required fields are marked *

Add Comment *

Name *

Email *

Website *

Please Install Theme Required & Recommended PLugins.