Previous Thread
Next Thread
Print Thread
Hop To
Custom Islands #226657 05/20/2009 9:14 AM
Joined: Jun 2006
Posts: 106
Flyin V Offline OP
member
OP Offline
member
Joined: Jun 2006
Posts: 106
I have another php page on my site.
I would like to put this page into a content island but can't seem to get it right.

First Attempt
__________
/* PHP CODE HERE, IF NECESSARY */
$text = include 'gb_news.php';
/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF
$text;
EOF;
/* DO NOT CHANGE THE LINE ABOVE */


Second Attempt:
__________
/* PHP CODE HERE, IF NECESSARY */

/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF
include 'gb_news.php';
EOF;
/* DO NOT CHANGE THE LINE ABOVE */
_____________

Any advice?

Just for fun whats on the gb_news.php page... its this.

<?
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'http://gamebuilder.info/ctpreview.php');
curl_exec($curl_handle);
curl_close($curl_handle);
?>

gamebuilder.info is a different server so I needed to use the CURL to get the page for security reasons.

The actual page getting this data works.
http://www.clickteam.com/epicenter/gb_news.php

but how do I get the custom island to display it?

Re: Custom Islands [Re: Flyin V] #226660 05/20/2009 11:40 AM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
I imagine your little script is just printing to stdout, so you'd probably need to do some output buffering. Something like this might work:

PHP Code

ob_start();
include '/path/to/gb_news.php';
$body = ob_get_contents();
ob_end_clean();
 

Re: Custom Islands [Re: Rick] #226702 05/22/2009 9:21 AM
Joined: Jun 2006
Posts: 106
Flyin V Offline OP
member
OP Offline
member
Joined: Jun 2006
Posts: 106
I am still at an epic failure on this.
How would I use your idea Rick?


/* PHP CODE HERE, IF NECESSARY */

ob_start();
include 'gb_news.php';
$text = ob_get_contents();
ob_end_clean();

/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF
$text;
EOF;
/* DO NOT CHANGE THE LINE ABOVE */

Re: Custom Islands [Re: Flyin V] #226709 05/22/2009 3:29 PM
Joined: Jun 2006
Posts: 9,243
Rick Offline
Former Developer
Offline
Former Developer
Joined: Jun 2006
Posts: 9,243
You'd do it exactly like I posted. Get rid of everything else and just put that (you will want to specify the full path to the gb_news.php script.


Link Copied to Clipboard
Forum Search
ShoutChat Box
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Subscriptions Question
by Ruben - 01/14/2020 12:11 PM
Page won't load after 7.7.3 Update
by Jim0421 - 01/08/2020 11:11 AM
Ubb 7.7.3 winkey emoji shortcut issue
by Ruben - 01/07/2020 4:04 PM
testing winkey emoji shortcut
by Ruben - 01/06/2020 2:36 PM
Very strange problem
by Baldeagle - 01/05/2020 1:22 PM
Who's Online Now
0 members (), 56 guests, and 363 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Amusing Terain Scenics
Amusing Terain Scenics
by isaac, August 19
Sky places
Sky places
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Snapshot build 20200106)