Integration

Welcome to the WonderCMS community. Anything goes, except for support requests.
Post Reply
Bedzeti
Posts: 29
Joined: Thu Nov 09, 2017 12:29 am

Integration

Post by Bedzeti »

Hallo , I wil now if its posible to integrate Wonder Cms to another web page??
or just have some code to show content on one html page ,not importan ful woder cms integrate to other website
I used iframe but problems with some internet browsers.....
Thanks
Eduard
wiz
Admin
Posts: 502
Joined: Sat Oct 30, 2010 12:23 am

Re: Integration

Post by wiz »

Hello Bedzeti!

What CMS is your website currently running on?

Additional questions:
- are you familiar with HTML and PHP?
- how is your current website set up, how does it work with iframe?

Is it possible to give us a broader description so we can help you better?
Bedzeti
Posts: 29
Joined: Thu Nov 09, 2017 12:29 am

Re: Integration

Post by Bedzeti »

Hello I try with iframe but problems with 100% width and no scroll funcion ....I try lot of codes.....
I use Website X5 software to build websites
I can insert in any page html blocks and I need if its possible to insert div id of contents from wondercms to my blocks to see only text edited with summernote editor ,
Bedzeti
Posts: 29
Joined: Thu Nov 09, 2017 12:29 am

Re: Integration

Post by Bedzeti »

If you have maybe some code to integrate fullpage Wondercms to another page without iframe , will help me....
Thanks
wiz
Admin
Posts: 502
Joined: Sat Oct 30, 2010 12:23 am

Re: Integration

Post by wiz »

Does the other page support PHP? If it does, I think it's possible to use PHP for fetching and displaying another page (without iframe).
Bedzeti
Posts: 29
Joined: Thu Nov 09, 2017 12:29 am

Re: Integration

Post by Bedzeti »

Yes also PHP.
The soft can make one or all to php.....
There is one dynamic content but very bad,I dont like it.
For me your WonderCMS is perfect and I can say to use it for my pages will be awesome....
Bedzeti
Posts: 29
Joined: Thu Nov 09, 2017 12:29 am

Re: Integration

Post by Bedzeti »

Have you something for me ??
wiz
Admin
Posts: 502
Joined: Sat Oct 30, 2010 12:23 am

Re: Integration

Post by wiz »

If I understand correctly, you have two website locations: A and B, where B is WonderCMS, and you want to display B website (WonderCMS) on website A.

On website A, you could use something like:

Code: Select all

<?php
    $html = file_get_contents('http://URL-TO-WEBSITE-B.COM/wonderCMS');
?>
For this solution to work properly, allow_url_fopen must be true in your php.ini.

Additional help: https://stackoverflow.com/questions/819 ... age-in-php
Bedzeti
Posts: 29
Joined: Thu Nov 09, 2017 12:29 am

Re: Integration

Post by Bedzeti »

Hello,
Thanks for answer .
I try it but don't work your code ...
From the additional help I try this code but lost menu from my website A :

<?php
// you can add anoother curl options too
// see here - http://php.net/manual/en/function.curl-setopt.php
function get_dataa($url) {
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$data = curl_exec($ch);
curl_close($ch);
return $data;
}

$variableee = get_dataa('http://example.com');
echo $variableee;
?>
wiz
Admin
Posts: 502
Joined: Sat Oct 30, 2010 12:23 am

Re: Integration

Post by wiz »

You will additionally have to check with your host:
- does your hosting package have cURL enabled?
- you will have to change

Code: Select all

$variableee = get_dataa('http://example.com');
with your actual domain you want to show - this is the "B" domain.

Here are other ways you can try, they also have good explanations:
https://oscarliang.com/six-ways-retriev ... ntent-php/

Important: You will always have to change the URL to your "B" domain.
Post Reply