Home > Hacking > Enabling proxies for joomla RSS feeds

Enabling proxies for joomla RSS feeds

August 24th, 2007 Leave a comment Go to comments

This is frus­trat­ing. Joomla is fan­tas­tic, but there are areas that are still very naive and under-coded. Take for exam­ple RSS feeds. If you’re behind a proxy, (aka cor­po­rate fire­wall), then you’re out of luck. How do you do it then?

Well, you need to find the file includes/domit/php_http_client_generic.php under your Joomla instal­la­tion, fire up your favourite edi­tor, (VI — of course Smile ). Now find the fol­low­ing sec­tion, (line 542 under Joomla 1.0.13).

function connect() {
if ($this->timeout == 0) {
$this->connection = @fsockopen($this->host, $this->port, $errorNumber, $errorString);
}
else {
$this->connection = @fsockopen($this->host, $this->port, $errorNumber, $errorString, $this->timeout);
}

You will need to change this to some­thing like the fol­low­ing. Change your host­name and port appropriately.

function connect() {
if ($this->timeout == 0) {
$this->connection = @fsockopen("proxy.myhost.com", 3128, $errorNumber, $errorString);
}
else {
$this->connection = @fsockopen("proxy.myhost.com", 3128, $errorNumber, $errorString, $this->timeout);
}

Then that’s it! You’re set! It can be slow at times, so ensure that you are caching XML files in your proxy server.

No related posts.

Categories: Hacking Tags:
  1. No comments yet.
  1. No trackbacks yet.
You must be logged in to post a comment.