cianclarke Posted April 1, 2007 Share Posted April 1, 2007 What I want to do is the following: <?php include 'http://www.cianclarke.com/gallery/main.php?g2_view=imageblock.External&g2_blocks=recentImage|recentImage|recentImage|&g2_show=title'; ?> However this doesn't work with dreamhost, as they won't allow http:// in the include - ie no remote includes (even though in this case it's actually local)... So instead I tried this: <?php include 'gallery/main.php'; $g2_view=imageblock.External; $g2_blocks=recentImage|recentImage|recentImage|; $g2_show=title; ?> However this still doesn't work - it just displays main.php, and doesn't seem to include the above. I also tried using cURL (some copy-pasted code which I didn't understand, needless to say this didn't work). So, what I'm trying to do is include this page: http://www.cianclarke.com/gallery/main.php?g2_view=imageblock.External&g2_blocks=recentImage|recentImage|recentImage|&g2_show=title Can anybody tell me how I do this in PHP - I need to be able to pass these variables so they work. It might also be worth mentioning I'm trying to do this in Joomla on a static page in the WYSIWYG TinyMCE, however I'll worry about the problems this presents when I get to this stage! Thanks Quote Link to comment Share on other sites More sharing options...
tarun Posted April 1, 2007 Share Posted April 1, 2007 Just Include This: gallery/main.php?g2_view=imageblock.External&g2_blocks=recentImage|recentImage|recentImage|&g2_show=title Quote Link to comment Share on other sites More sharing options...
cianclarke Posted April 1, 2007 Author Share Posted April 1, 2007 Doesn't work - then it's looking for a file called "gallery/main.php?g2_view=imageblock.External&g2_blocks=recentImage|recentImage|recentImage|&g2_show=title" - instead of doing what it should be doing, i.e. looking for gallery/main.php. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted April 1, 2007 Share Posted April 1, 2007 The include statement is used to include PHP statements into your script, when you try to include a file referenced by a URL, the only thing that will be included is the output of the script -- usually not what you intended. Did you try: <?php $g2_view=imageblock.External; $g2_blocks=recentImage|recentImage|recentImage|; $g2_show=title; include 'gallery/main.php'; ?> Ken Quote Link to comment Share on other sites More sharing options...
cianclarke Posted April 1, 2007 Author Share Posted April 1, 2007 Nope, it still just includes main.php without the recent images block I'm afraid, as if it was including main.php rather than main.php?imageblock.External&g2_blocks=recentImage|recentImage|recentImage|&g2_show=title Thanks for the help so far Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.