WordPress.org

Forums

Suggestion: modify fetch_rss to let it set more Snoopy variables (2 posts)

  1. carlok
    Member
    Posted 7 years ago #

    Hello.

    To fecth a remote feed in WordPress, you can use Snoopy that is placed in wp-includes/class-snoopy.php

    You can use it including
    wp-includes/rss.php
    and calling
    fetch_rss($url)
    that calls
    _fetch_remote_file($url, $headers = "")
    that instances an object of the Snoopy class

    BUT

    I have to use Snoopy on a server that doesn't allow me to set an HTTP proxy through php.ini or something at "system" level so my workaround was to set the public variables
    $proxy_host
    and
    $proxy_port
    of the Snoopy class: why don't let fetch_rss use an additional parameter to set some Snoopy variable? I suppose it is not fair to set them through _fetch_remote_file because it is "private".

    Thank you.

  2. carlok
    Member
    Posted 7 years ago #

    It seems to be already discussed here
    http://trac.wordpress.org/ticket/4011

Topic Closed

This topic has been closed to new replies.

About this Topic