Previous Thread
Next Thread
Print Thread
Hop To
#226657 05/20/2009 10:14 AM
Joined: Jun 2006
Posts: 106
member
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?

Flyin V #226660 05/20/2009 12:40 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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();
 

Rick #226702 05/22/2009 10:21 AM
Joined: Jun 2006
Posts: 106
member
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 */

Flyin V #226709 05/22/2009 4:29 PM
Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
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
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
0 members (), 1,069 guests, and 175 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)