<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/85012</link>
    <title>MATLAB Central Newsreader - Re: urlread</title>
    <description>Feed for thread: Re: urlread</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 06 Jan 2005 18:16:19 -0500</pubDate>
      <title>Re: urlread</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/85012#216482</link>
      <author>Bart</author>
      <description>A small change to Matthew's code was needed to make it work. In&lt;br&gt;
urlread.m, change/add the following:&lt;br&gt;
&lt;br&gt;
% Open a connection to the URL.&lt;br&gt;
urlConnection = url.openConnection;&lt;br&gt;
password = 'username:password';&lt;br&gt;
encodedPassword =&lt;br&gt;
org.apache.axis.encoding.Base64.encode(double(password));&lt;br&gt;
myPwd = ['Basic ' encodedPassword.toCharArray'];&lt;br&gt;
urlConnection.setRequestProperty('Proxy-Authorization',myPwd);&lt;br&gt;
&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; We don't have this sort of proxy, so I can't test it out. Let us&lt;br&gt;
&amp;gt; know how it works and I'll see about rolling this fix into the&lt;br&gt;
&amp;gt; shipping version.&lt;br&gt;
I am behind a proxy which requires authorisation, and modifying&lt;br&gt;
urlread.m as above works for me.&lt;br&gt;
&lt;br&gt;
Cheers&lt;br&gt;
Bart</description>
    </item>
    <item>
      <pubDate>Thu, 13 Jan 2005 12:16:27 -0500</pubDate>
      <title>Re: urlread</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/85012#217941</link>
      <author>William</author>
      <description>Matthew Simoneau wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; I don't think you what the &quot;&lt;a href=&quot;http://&quot;&gt;http://&lt;/a&gt;&quot;&lt;br&gt;
&amp;gt; refix when you specify your proxy server in the preferences.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; What version of MATLAB are you using? I think we've only been&lt;br&gt;
&amp;gt; shipping the Axis classes since R14sp1. If you're on an older&lt;br&gt;
&amp;gt; version, you'll have to find another encoder. You may be able to&lt;br&gt;
&amp;gt; use&lt;br&gt;
&amp;gt; the undocumented classes in Sun's JVM. Try this:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; % Open a connection to the URL.&lt;br&gt;
&amp;gt; urlConnection = url.openConnection;&lt;br&gt;
&amp;gt; password = 'username:password';&lt;br&gt;
&amp;gt; encoder = sun.misc.BASE64Encoder;&lt;br&gt;
&amp;gt; encodedPassword = encoder.encode(double(password));&lt;br&gt;
&amp;gt; myPwd = ['Basic ' encodedPassword.toCharArray'];&lt;br&gt;
&amp;gt; urlConnection.setRequestProperty('Proxy-Authorization',myPwd);&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Does this work?&lt;br&gt;
&lt;br&gt;
Hi Matthew,&lt;br&gt;
&lt;br&gt;
it is R14. I authored the file and it seemed to work although it did&lt;br&gt;
hang the machine a few times. Thanks for all the advice. Is it easy&lt;br&gt;
to connect to yahoo finance (for example) and drag down the market&lt;br&gt;
information? I wish to run this function file for time-series data&lt;br&gt;
analysis.&lt;br&gt;
&lt;br&gt;
Many thanks for the support&lt;br&gt;
&lt;br&gt;
Kind regards&lt;br&gt;
Will</description>
    </item>
  </channel>
</rss>

