This is not a support question
It's simply a topic for anyone who want's everything external without the use of iFrames.
I've accomplished this by adding a simple PHP script in the root of my website:
filename: external_config_loader.php
This simply avoids the cross-domain problems by loading it with PHP and echo the same output as XML for use as your config file.
Your product config will still use the same two parameters (path and root).
Path: **Your url to your external .xml file"
Root:**The root folder, normally the same folder as your .xml file resides in**
JS implementation (in this example it's Magento):
This first checks if the path is an external path, if so, calls the external_config_loader.php file with the path as a get variable.
The location of files etc is depending on your type of implementation but this will give an idea.
@webrotate360 team, this can easally be implementated in any plugin for popular CMS systems.
Just wanted to share
It's simply a topic for anyone who want's everything external without the use of iFrames.
I've accomplished this by adding a simple PHP script in the root of my website:
filename: external_config_loader.php
Code:
<?php
$url = $_GET['xmlurl'];
$info = pathinfo( $url );
if ( $info['extension'] != 'xml' ) {
exit( 'Not a XML file.' );
}
$file = file_get_contents( $url );
header("Content-type: text/xml");
echo $file;
exit();
This simply avoids the cross-domain problems by loading it with PHP and echo the same output as XML for use as your config file.
Your product config will still use the same two parameters (path and root).
Path: **Your url to your external .xml file"
Root:**The root folder, normally the same folder as your .xml file resides in**
JS implementation (in this example it's Magento):
Code:
<?php if ( strpos( $_360path, 'http' ) !== false ): ?>
_imageRotator.settings.configFileURL = "http://www.yoursite.domain/external_config_loader.php?xmlurl=<?php echo $_360path ?>";
<?php else: ?>
_imageRotator.settings.configFileURL = "http://www.yoursite.domain/<?php echo $_360path ?>";
<?php endif ?>
This first checks if the path is an external path, if so, calls the external_config_loader.php file with the path as a get variable.
The location of files etc is depending on your type of implementation but this will give an idea.
@webrotate360 team, this can easally be implementated in any plugin for popular CMS systems.
Just wanted to share