The behaviour you describe in bash is expected as the shell will interpret the first non-escaped & (to background the process) and ignore the rest unless you escape or quote the individual & chars or the entire string.
As for using RemoteRequest, there should be nothing to do other than put your URL in quotes. The following works perfectly for me in 0.9.1... $output = RemoteRequest::get_contents( ' http://wiki.habariproject.org/w/api.php?action=feedwatchlist&allrev=allrev&wlowner=Lildude&wltoken=<TOKEN>&feedformat=atom' ); Utils::debug( $output ); I get the following in the debug output: --- string <?xml version="1.0"?> <?xml-stylesheet type="text/css" href=" http://wiki.habariproject.org/w/skins/common/feed.css?270"?> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> <id> http://wiki.habariproject.org/w/api.php?action=feedwatchlist&allrev=allrev&wlowner=Lildude&wltoken= <TOKEN>&feedformat=atom</id> <title>Habari Project - My watchlist [en]</title> <link rel="self" type="application/atom+xml" href=" http://wiki.habariproject.org/w/api.php?action=feedwatchlist&allrev=allrev&wlowner=Lildude&wltoken= <TOKEN>&feedformat=atom"/> <link rel="alternate" type="text/html" href=" http://wiki.habariproject.org/en/Special:Watchlist"/> <updated>2013-08-20T14:26:01Z</updated> <subtitle>My watchlist</subtitle> <generator>MediaWiki 1.16.1</generator> </feed> --- On 17 August 2013 03:15, Konzertheld <[email protected]> wrote: > Hi everyone, > > here's another weird issue I came across. > > I'm trying to access Atom feeds of Wiki watchlists. Those require passing > a token and a list of &ed parameters. It turned out I can't receive the > feed because the token is not transmitted correctly for some reason. > Testing with CURL myself, the same problem occured, but only if I did not > put single quotes around the URL. Using single quotes or escaping all the > &s with \ made it work for CURL in a bash. Now what should I do to make the > links work with Habari's RemoteRequest? > > Those of you having an account in the Habari Wiki can test themselves: > > 1. Get the feed link for your watchlist (it's in the sidebar) > 2. Throw it into RemoteRequest::get_contents() > 3. Throw it into CURL in a terminal > 4. Throw it into CURL in a terminal, enclosed in single quotes > > Only the last one will show your watchlist. > > I'm quite sure the problem is somewhere on the way between my or Habari's > code setting up the request and CURL itself. So if you have any ideas, it > will be appreciated. > > Konzertheld > > -- > -- > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/habari-dev > --- > You received this message because you are subscribed to the Google Groups > "habari-dev" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- Colin Seymour Blog: http://colinseymour.co.uk Tech Stuff: http://lildude.co.uk Barefoot Running: http://barefootrunner.co.uk IRC: lildude #habari -- -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/habari-dev --- You received this message because you are subscribed to the Google Groups "habari-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
