1

Topic: Utilizing extern.php on the same server...

Hi there,

I want to utilise the extern.php for dropping RSS links into each section. But I don't wish to visibly link to the extern.php, I've attempted two methods, both of which have failed...

Method 1

<?php

$forum = $_GET['id'];

header ("Content-Type: text/xml");
header ("Content-Disposition: inline; filename=http://bbs.dontassrape.us/extern.php?action=active&fid=$forum&type=rss");

?>

Method 2

<?php

$forum = $_GET['id'];

header ("Content-Type: text/xml");
include ("http://bbs.dontassrape.us/extern.php?action=active&fid=" . $forum . "&type=rss");

?>

Ohh, and as you can see, the forum is up at http://bbs.dontassrape.us.

If anyone would know a better way of which to do this, please inform. smile

Re: Utilizing extern.php on the same server...

Uh, "dropping RSS links"? I'm not exactly sure what you mean.

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

3

Re: Utilizing extern.php on the same server...

Okay, I will re-explain for the nimble hearted, I don't want to visibly show the extern.php, so, I would like to write a php file that you just parse eg,  rss.php?id=1234 (1234 being the forum ID in order to show the rss).

4

Re: Utilizing extern.php on the same server...

As extern.php DOES ALREADY support the 'fid=nnn' parameter, i don't see why u whould need a redirection for calling it.
Just link to "extern.php?action=active&fid=XXX&type=rss", and it should work....

5 (edited by RHF 2008-03-26 00:27)

Re: Utilizing extern.php on the same server...

I have done, I was just wondering if there was a fairly simple way in which to do it with a separate file.

Am I just being a pain in the ass? Surely someone can right me where I'm wrong on my 5 or so lines of code.

[edit]

I think I'll have a bash with Curl when I wake up later today.

Re: Utilizing extern.php on the same server...

So you want to create an alias for extern.php? Seems rather useless, but yeah, just use cURL and send the right content headers.

7

Re: Utilizing extern.php on the same server...

I am a man of aesthetics.

Re: Utilizing extern.php on the same server...

If rss.php is just supposed to be a wrapper, you don't need cURL.
Just set the right $_GET variables from within PHP, include extern.php, and you're set.

http://fluxbb.org

Free PunBB Hosting - lots of mods, easy to customize

9

Re: Utilizing extern.php on the same server...

I worked out what it was, I have short_open_tags enabled, my first example of code should work just fine when I disable that.