<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Perl Script to put Weather on your Polycom Microbrowser</title>
	<atom:link href="http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/</link>
	<description>Patrick and Fred Chat... sometimes about VoIP</description>
	<lastBuildDate>Wed, 10 Mar 2010 19:10:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: BradPiper</title>
		<link>http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/comment-page-1/#comment-1379</link>
		<dc:creator>BradPiper</dc:creator>
		<pubDate>Wed, 12 Aug 2009 15:27:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.voiptechchat.com/?p=208#comment-1379</guid>
		<description>Cool code but I am not sure how to get the XML-TreePP perl module as we are behing firewall and proxy gateways info are not disclosed to users. I downloaded the XML-TreePP-0.39.tar.gz from CPAN.org and in PPM i set my repository to local with the ppd file. However the installation failed with 

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\&gt;perl
-version
Exit
;Quit
Can&#039;t locate object method &quot;version&quot; via package &quot;Exit&quot; (perhaps you forgot to l
oad &quot;Exit&quot;?) at - line 1.

C:\&gt;perl ?
Can&#039;t open perl script &quot;?&quot;: Invalid argument

C:\&gt;perl -help

Usage: C:\Perl\bin\perl.exe [switches] [--] [programfile] [arguments]
  -0[octal]       specify record separator (, if no argument)
  -a              autosplit mode with -n or -p (splits $_ into @F)
  -C              enable native wide character system interfaces
  -c              check syntax only (runs BEGIN and CHECK blocks)
  -d[:debugger]   run program under debugger
  -D[number/list] set debugging flags (argument is a bit mask or alphabets)
  -e &#039;command&#039;    one line of program (several -e&#039;s allowed, omit programfile)
  -F/pattern/     split() pattern for -a switch (//&#039;s are optional)
  -i[extension]   edit  files in place (makes backup if extension supplied)
  -Idirectory     specify @INC/#include directory (several -I&#039;s allowed)
  -l[octal]       enable line ending processing, specifies line terminator
  -[mM][-]module  execute `use/no module...&#039; before executing program
  -n              assume &#039;while () { ... }&#039; loop around program
  -p              assume loop like -n but print line also, like sed
  -P              run program through C preprocessor before compilation
  -s              enable rudimentary parsing for switches after programfile
  -S              look for programfile using PATH environment variable
  -T              enable tainting checks
  -t              enable tainting warnings
  -u              dump core after parsing program
  -U              allow unsafe operations
  -v              print version, subversion (includes VERY IMPORTANT perl info)
  -V[:variable]   print configuration summary (or a single Config.pm variable)
  -w              enable many useful warnings (RECOMMENDED)
  -W              enable all warnings
  -X              disable all warnings
  -x[directory]   strip off text before #!perl line and perhaps cd to directory


C:\&gt;PPM -help
Unknown or ambiguous command &#039;-help&#039;; type &#039;help&#039; for commands.

C:\&gt;ppm
PPM - Programmer&#039;s Package Manager version 3.0.1.
Copyright (c) 2001 ActiveState SRL. All Rights Reserved.

Entering interactive shell. Using Term::ReadLine::Stub as readline library.

Profile tracking is not enabled. If you save and restore profiles manually,
your profile may be out of sync with your computer. See &#039;help profile&#039; for
more information.

Type &#039;help&#039; to get started.

ppm&gt; help
Type &#039;help command&#039; for more detailed help on a command.
  Commands:
    describe   - describes packages in detail
    exit       - exits the program
    help       - prints this screen, or help on &#039;command&#039;
    install    - installs packages
    profiles   - manage PPM profiles
    properties - describes installed packages in detail
    q          - exits the program
    query      - queries installed packages
    quickstart - a crash course in using PPM
    quit       - exits the program
    remove     - uninstalls packages
    repository - adds, removes, or sets repositories
    s          - searches for packages in a repository - no help available
    search     - searches for packages in a repository
    settings   - view or set PPM options
    targets    - views or sets target installer backends
    tree       - shows package dependency tree
    uninstall  - uninstalls packages
    upgrade    - shows availables upgrades for installed packages
    version    - displays the PPM version (3.0.1)
  Extra Help Topics: (not commands)
    ppm_migration - guide for those familiar with PPM
    prompt        - how to interpret the PPM prompt
    unicode       - notes about unicode author names
ppm&gt; install
No search results to install -- use &#039;search&#039; to find a package.
ppm&gt; repository
Repositories:
[1] ActiveState PPM2 Repository
[2] ActiveState Package Repository
ppm&gt; quit

C:\&gt;cd dload

C:\dload&gt;cd cpan

C:\dload\cpan&gt;dir
 Volume in drive C has no label.
 Volume Serial Number is 887B-3050

 Directory of C:\dload\cpan

08/12/2009  09:06 AM              .
08/12/2009  09:06 AM              ..
08/12/2009  08:52 AM            80,485 XML-TreePP-0.39.tar.gz
08/12/2009  09:06 AM               338 XML-TreePP.ppd
               2 File(s)         80,823 bytes
               2 Dir(s)  28,102,840,320 bytes free

C:\dload\cpan&gt;PPM
PPM - Programmer&#039;s Package Manager version 3.0.1.
Copyright (c) 2001 ActiveState SRL. All Rights Reserved.

Entering interactive shell. Using Term::ReadLine::Stub as readline library.

Profile tracking is not enabled. If you save and restore profiles manually,
your profile may be out of sync with your computer. See &#039;help profile&#039; for
more information.

Type &#039;help&#039; to get started.

ppm&gt; set repository localhost ./
Unknown or ambiguous setting &#039;repository&#039;. See &#039;help settings&#039;.
ppm&gt; set
  case-sensitivity: 0
download-chunksize: 16384
            fields: name version abstract
    follow-install: 1
     force-install: 0
   install-verbose: 1
             pager:
     profile-track: 0
    prompt-context: 0
   prompt-slotsize: 11
    prompt-verbose: 0
    remove-verbose: 1
        sort-field: name
           tempdir: C:\TEMP
        trace-file: ppm3.log
       trace-level: 0
   upgrade-verbose: 1
   verbose-startup: 1
ppm&gt; quit

C:\dload\cpan&gt;ppm3
&#039;ppm3&#039; is not recognized as an internal or external command,
operable program or batch file.

C:\dload\cpan&gt;ppm
PPM - Programmer&#039;s Package Manager version 3.0.1.
Copyright (c) 2001 ActiveState SRL. All Rights Reserved.

Entering interactive shell. Using Term::ReadLine::Stub as readline library.

Profile tracking is not enabled. If you save and restore profiles manually,
your profile may be out of sync with your computer. See &#039;help profile&#039; for
more information.

Type &#039;help&#039; to get started.

ppm&gt; quit

C:\dload\cpan&gt;ppm2
PPM interactive shell (2.1.6) - type &#039;help&#039; for available commands.
PPM&gt; set repository localpc ./
PPM&gt; set
Commands will be confirmed.
Temporary files will be deleted.
Download status will be updated every 16384 bytes.
Case-sensitive searches will be performed.
Package installations will continue if a dependency cannot be installed.
Tracing info will not be written.
Screens will pause after 24 lines.
Query/search results will be verbose.
Current PPD repository paths:
        localpc: ./
        ActiveState Package Repository: http://ppm.ActiveState.com/cgibin/PPM/pp
mserver-5.8-windows.pl?urn:/PPMServer
Packages will be built under: C:\DOCUME~1\98013\LOCALS~1\Temp
PPM&gt; install XML-TreePP
Install package &#039;XML-TreePP?&#039; (y/N): y
Installing package &#039;XML-TreePP&#039;...
Bytes transferred: 80485
Writing C:\Perl\site\lib\auto\XML\TreePP\.packlist
Duplicate POD found (shadowing?): Tk::CmdLine (C:\Perl\site\lib/Tk/CmdLine.pod)
    Already seen in C:\Perl\site\lib/Tk/CmdLine.pm
PPM&gt; locate
Unknown or ambiguous command &#039;locate&#039;; type &#039;help&#039; for commands.
PPM&gt; find
Unknown or ambiguous command &#039;find&#039;; type &#039;help&#039; for commands.
PPM&gt; help
Commands:
    exit              - leave the program.
    help [command]    - prints this screen, or help on &#039;command&#039;.
    install PACKAGES  - installs specified PACKAGES.
    quit              - leave the program.
    query [options]   - query information about installed packages.
    remove PACKAGES   - removes the specified PACKAGES from the system.
    search [options]  - search information about available packages.
    set [options]     - set/display current options.
    verify [options]  - verifies current install is up to date.
    version           - displays PPM version number

PPM&gt; query
Archive-Tar      [0.072  ] module for manipulation of tar archives.
Compress-Zlib    [1.16   ] Interface to zlib compression library
Digest-HMAC      [1.01   ] Keyed-Hashing for Message Authentication
Digest-MD2       [2      ] Perl interface to the MD2 Algorithm
Digest-MD4       [1.1    ] Perl interface to the MD4 Algorithm
Digest-SHA1      [2.01   ] Perl interface to the SHA-1 Algorithm
File-CounterFile [0.12   ] Persistent counter class
Font-AFM         [1.18   ] Interface to Adobe Font Metrics files
HTML-Parser      [3.26   ] HTML parser class
HTML-Tagset      [3.03   ] Data tables useful in parsing HTML
HTML-Tree        [3.11   ] HTML syntax tree builder
MD5              [2.02   ] Perl interface to the MD5 Algorithm (obsolete)
PPM              [2.1.6  ] Perl Package Manager: locate, install, upgrade
                           software packages.
SOAP-Lite        [0.55   ] Library for Simple Object Access Protocol (SOAP)
                           clients and servers in Perl
Tk               [800.024] A Graphical User Interface Toolkit
URI              [1.19   ] Uniform Resource Identifiers (absolute and relative)
XML-Parser       [2.31   ] A Perl module for parsing XML documents
XML-Simple       [1.06   ] Easy API to read/write XML (esp config files)
XML-TreePP       [6.3    ] Blah
libwin32         [0.20   ] A collection of extensions that aims to provide
                           comprehensive access to the Windows API.
[Press return to continue or &#039;q&#039; to quit]
PPM&gt; query XML-TreePP
XML-TreePP [6.3] Blah
PPM&gt; uninstall
Unknown or ambiguous command &#039;uninstall&#039;; type &#039;help&#039; for commands.
PPM&gt; install XML-TreePP
Install package &#039;XML-TreePP?&#039; (y/N): y
Installing package &#039;XML-TreePP&#039;...
Bytes transferred: 80485
Writing C:\Perl\site\lib\auto\XML\TreePP\.packlist
Duplicate POD found (shadowing?): Tk::CmdLine (C:\Perl\site\lib/Tk/CmdLine.pod)
    Already seen in C:\Perl\site\lib/Tk/CmdLine.pm
PPM&gt; query XML-TreePP
XML-TreePP [6.3] Blah
PPM&gt;

Any Idea how to workaround this? Tks.</description>
		<content:encoded><![CDATA[<p>Cool code but I am not sure how to get the XML-TreePP perl module as we are behing firewall and proxy gateways info are not disclosed to users. I downloaded the XML-TreePP-0.39.tar.gz from CPAN.org and in PPM i set my repository to local with the ppd file. However the installation failed with </p>
<p>Microsoft Windows XP [Version 5.1.2600]<br />
(C) Copyright 1985-2001 Microsoft Corp.</p>
<p>C:\&gt;perl<br />
-version<br />
Exit<br />
;Quit<br />
Can&#8217;t locate object method &#8220;version&#8221; via package &#8220;Exit&#8221; (perhaps you forgot to l<br />
oad &#8220;Exit&#8221;?) at &#8211; line 1.</p>
<p>C:\&gt;perl ?<br />
Can&#8217;t open perl script &#8220;?&#8221;: Invalid argument</p>
<p>C:\&gt;perl -help</p>
<p>Usage: C:\Perl\bin\perl.exe [switches] [--] [programfile] [arguments]<br />
  -0[octal]       specify record separator (, if no argument)<br />
  -a              autosplit mode with -n or -p (splits $_ into @F)<br />
  -C              enable native wide character system interfaces<br />
  -c              check syntax only (runs BEGIN and CHECK blocks)<br />
  -d[:debugger]   run program under debugger<br />
  -D[number/list] set debugging flags (argument is a bit mask or alphabets)<br />
  -e &#8216;command&#8217;    one line of program (several -e&#8217;s allowed, omit programfile)<br />
  -F/pattern/     split() pattern for -a switch (//&#8217;s are optional)<br />
  -i[extension]   edit  files in place (makes backup if extension supplied)<br />
  -Idirectory     specify @INC/#include directory (several -I&#8217;s allowed)<br />
  -l[octal]       enable line ending processing, specifies line terminator<br />
  -[mM][-]module  execute `use/no module&#8230;&#8217; before executing program<br />
  -n              assume &#8216;while () { &#8230; }&#8217; loop around program<br />
  -p              assume loop like -n but print line also, like sed<br />
  -P              run program through C preprocessor before compilation<br />
  -s              enable rudimentary parsing for switches after programfile<br />
  -S              look for programfile using PATH environment variable<br />
  -T              enable tainting checks<br />
  -t              enable tainting warnings<br />
  -u              dump core after parsing program<br />
  -U              allow unsafe operations<br />
  -v              print version, subversion (includes VERY IMPORTANT perl info)<br />
  -V[:variable]   print configuration summary (or a single Config.pm variable)<br />
  -w              enable many useful warnings (RECOMMENDED)<br />
  -W              enable all warnings<br />
  -X              disable all warnings<br />
  -x[directory]   strip off text before #!perl line and perhaps cd to directory</p>
<p>C:\&gt;PPM -help<br />
Unknown or ambiguous command &#8216;-help&#8217;; type &#8216;help&#8217; for commands.</p>
<p>C:\&gt;ppm<br />
PPM &#8211; Programmer&#8217;s Package Manager version 3.0.1.<br />
Copyright (c) 2001 ActiveState SRL. All Rights Reserved.</p>
<p>Entering interactive shell. Using Term::ReadLine::Stub as readline library.</p>
<p>Profile tracking is not enabled. If you save and restore profiles manually,<br />
your profile may be out of sync with your computer. See &#8216;help profile&#8217; for<br />
more information.</p>
<p>Type &#8216;help&#8217; to get started.</p>
<p>ppm&gt; help<br />
Type &#8216;help command&#8217; for more detailed help on a command.<br />
  Commands:<br />
    describe   &#8211; describes packages in detail<br />
    exit       &#8211; exits the program<br />
    help       &#8211; prints this screen, or help on &#8216;command&#8217;<br />
    install    &#8211; installs packages<br />
    profiles   &#8211; manage PPM profiles<br />
    properties &#8211; describes installed packages in detail<br />
    q          &#8211; exits the program<br />
    query      &#8211; queries installed packages<br />
    quickstart &#8211; a crash course in using PPM<br />
    quit       &#8211; exits the program<br />
    remove     &#8211; uninstalls packages<br />
    repository &#8211; adds, removes, or sets repositories<br />
    s          &#8211; searches for packages in a repository &#8211; no help available<br />
    search     &#8211; searches for packages in a repository<br />
    settings   &#8211; view or set PPM options<br />
    targets    &#8211; views or sets target installer backends<br />
    tree       &#8211; shows package dependency tree<br />
    uninstall  &#8211; uninstalls packages<br />
    upgrade    &#8211; shows availables upgrades for installed packages<br />
    version    &#8211; displays the PPM version (3.0.1)<br />
  Extra Help Topics: (not commands)<br />
    ppm_migration &#8211; guide for those familiar with PPM<br />
    prompt        &#8211; how to interpret the PPM prompt<br />
    unicode       &#8211; notes about unicode author names<br />
ppm&gt; install<br />
No search results to install &#8212; use &#8217;search&#8217; to find a package.<br />
ppm&gt; repository<br />
Repositories:<br />
[1] ActiveState PPM2 Repository<br />
[2] ActiveState Package Repository<br />
ppm&gt; quit</p>
<p>C:\&gt;cd dload</p>
<p>C:\dload&gt;cd cpan</p>
<p>C:\dload\cpan&gt;dir<br />
 Volume in drive C has no label.<br />
 Volume Serial Number is 887B-3050</p>
<p> Directory of C:\dload\cpan</p>
<p>08/12/2009  09:06 AM              .<br />
08/12/2009  09:06 AM              ..<br />
08/12/2009  08:52 AM            80,485 XML-TreePP-0.39.tar.gz<br />
08/12/2009  09:06 AM               338 XML-TreePP.ppd<br />
               2 File(s)         80,823 bytes<br />
               2 Dir(s)  28,102,840,320 bytes free</p>
<p>C:\dload\cpan&gt;PPM<br />
PPM &#8211; Programmer&#8217;s Package Manager version 3.0.1.<br />
Copyright (c) 2001 ActiveState SRL. All Rights Reserved.</p>
<p>Entering interactive shell. Using Term::ReadLine::Stub as readline library.</p>
<p>Profile tracking is not enabled. If you save and restore profiles manually,<br />
your profile may be out of sync with your computer. See &#8216;help profile&#8217; for<br />
more information.</p>
<p>Type &#8216;help&#8217; to get started.</p>
<p>ppm&gt; set repository localhost ./<br />
Unknown or ambiguous setting &#8216;repository&#8217;. See &#8216;help settings&#8217;.<br />
ppm&gt; set<br />
  case-sensitivity: 0<br />
download-chunksize: 16384<br />
            fields: name version abstract<br />
    follow-install: 1<br />
     force-install: 0<br />
   install-verbose: 1<br />
             pager:<br />
     profile-track: 0<br />
    prompt-context: 0<br />
   prompt-slotsize: 11<br />
    prompt-verbose: 0<br />
    remove-verbose: 1<br />
        sort-field: name<br />
           tempdir: C:\TEMP<br />
        trace-file: ppm3.log<br />
       trace-level: 0<br />
   upgrade-verbose: 1<br />
   verbose-startup: 1<br />
ppm&gt; quit</p>
<p>C:\dload\cpan&gt;ppm3<br />
&#8216;ppm3&#8242; is not recognized as an internal or external command,<br />
operable program or batch file.</p>
<p>C:\dload\cpan&gt;ppm<br />
PPM &#8211; Programmer&#8217;s Package Manager version 3.0.1.<br />
Copyright (c) 2001 ActiveState SRL. All Rights Reserved.</p>
<p>Entering interactive shell. Using Term::ReadLine::Stub as readline library.</p>
<p>Profile tracking is not enabled. If you save and restore profiles manually,<br />
your profile may be out of sync with your computer. See &#8216;help profile&#8217; for<br />
more information.</p>
<p>Type &#8216;help&#8217; to get started.</p>
<p>ppm&gt; quit</p>
<p>C:\dload\cpan&gt;ppm2<br />
PPM interactive shell (2.1.6) &#8211; type &#8216;help&#8217; for available commands.<br />
PPM&gt; set repository localpc ./<br />
PPM&gt; set<br />
Commands will be confirmed.<br />
Temporary files will be deleted.<br />
Download status will be updated every 16384 bytes.<br />
Case-sensitive searches will be performed.<br />
Package installations will continue if a dependency cannot be installed.<br />
Tracing info will not be written.<br />
Screens will pause after 24 lines.<br />
Query/search results will be verbose.<br />
Current PPD repository paths:<br />
        localpc: ./<br />
        ActiveState Package Repository: <a href="http://ppm.ActiveState.com/cgibin/PPM/pp" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/ppm.ActiveState.com/cgibin/PPM/pp?referer=');">http://ppm.ActiveState.com/cgibin/PPM/pp</a><br />
mserver-5.8-windows.pl?urn:/PPMServer<br />
Packages will be built under: C:\DOCUME~1\98013\LOCALS~1\Temp<br />
PPM&gt; install XML-TreePP<br />
Install package &#8216;XML-TreePP?&#8217; (y/N): y<br />
Installing package &#8216;XML-TreePP&#8217;&#8230;<br />
Bytes transferred: 80485<br />
Writing C:\Perl\site\lib\auto\XML\TreePP\.packlist<br />
Duplicate POD found (shadowing?): Tk::CmdLine (C:\Perl\site\lib/Tk/CmdLine.pod)<br />
    Already seen in C:\Perl\site\lib/Tk/CmdLine.pm<br />
PPM&gt; locate<br />
Unknown or ambiguous command &#8216;locate&#8217;; type &#8216;help&#8217; for commands.<br />
PPM&gt; find<br />
Unknown or ambiguous command &#8216;find&#8217;; type &#8216;help&#8217; for commands.<br />
PPM&gt; help<br />
Commands:<br />
    exit              &#8211; leave the program.<br />
    help [command]    &#8211; prints this screen, or help on &#8216;command&#8217;.<br />
    install PACKAGES  &#8211; installs specified PACKAGES.<br />
    quit              &#8211; leave the program.<br />
    query [options]   &#8211; query information about installed packages.<br />
    remove PACKAGES   &#8211; removes the specified PACKAGES from the system.<br />
    search [options]  &#8211; search information about available packages.<br />
    set [options]     &#8211; set/display current options.<br />
    verify [options]  &#8211; verifies current install is up to date.<br />
    version           &#8211; displays PPM version number</p>
<p>PPM&gt; query<br />
Archive-Tar      [0.072  ] module for manipulation of tar archives.<br />
Compress-Zlib    [1.16   ] Interface to zlib compression library<br />
Digest-HMAC      [1.01   ] Keyed-Hashing for Message Authentication<br />
Digest-MD2       [2      ] Perl interface to the MD2 Algorithm<br />
Digest-MD4       [1.1    ] Perl interface to the MD4 Algorithm<br />
Digest-SHA1      [2.01   ] Perl interface to the SHA-1 Algorithm<br />
File-CounterFile [0.12   ] Persistent counter class<br />
Font-AFM         [1.18   ] Interface to Adobe Font Metrics files<br />
HTML-Parser      [3.26   ] HTML parser class<br />
HTML-Tagset      [3.03   ] Data tables useful in parsing HTML<br />
HTML-Tree        [3.11   ] HTML syntax tree builder<br />
MD5              [2.02   ] Perl interface to the MD5 Algorithm (obsolete)<br />
PPM              [2.1.6  ] Perl Package Manager: locate, install, upgrade<br />
                           software packages.<br />
SOAP-Lite        [0.55   ] Library for Simple Object Access Protocol (SOAP)<br />
                           clients and servers in Perl<br />
Tk               [800.024] A Graphical User Interface Toolkit<br />
URI              [1.19   ] Uniform Resource Identifiers (absolute and relative)<br />
XML-Parser       [2.31   ] A Perl module for parsing XML documents<br />
XML-Simple       [1.06   ] Easy API to read/write XML (esp config files)<br />
XML-TreePP       [6.3    ] Blah<br />
libwin32         [0.20   ] A collection of extensions that aims to provide<br />
                           comprehensive access to the Windows API.<br />
[Press return to continue or 'q' to quit]<br />
PPM&gt; query XML-TreePP<br />
XML-TreePP [6.3] Blah<br />
PPM&gt; uninstall<br />
Unknown or ambiguous command &#8216;uninstall&#8217;; type &#8216;help&#8217; for commands.<br />
PPM&gt; install XML-TreePP<br />
Install package &#8216;XML-TreePP?&#8217; (y/N): y<br />
Installing package &#8216;XML-TreePP&#8217;&#8230;<br />
Bytes transferred: 80485<br />
Writing C:\Perl\site\lib\auto\XML\TreePP\.packlist<br />
Duplicate POD found (shadowing?): Tk::CmdLine (C:\Perl\site\lib/Tk/CmdLine.pod)<br />
    Already seen in C:\Perl\site\lib/Tk/CmdLine.pm<br />
PPM&gt; query XML-TreePP<br />
XML-TreePP [6.3] Blah<br />
PPM&gt;</p>
<p>Any Idea how to workaround this? Tks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dragan Tomas</title>
		<link>http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/comment-page-1/#comment-564</link>
		<dc:creator>Dragan Tomas</dc:creator>
		<pubDate>Thu, 09 Apr 2009 18:45:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.voiptechchat.com/?p=208#comment-564</guid>
		<description>Thank you very much for this great piece of code, but you failed to mention a small fact about the need to execute this perl script with su (sudo) privileges and have the html folder created under /var/www/ prior to running it for the first time if using apache2 web server, because that&#039;s where the resulting polyweather.html file is to be created.

The only thing I haven&#039;t figured out yet is how to get the weatherbyzip.html to work because all it shows on my web browser is the code that&#039;s in it, nothing gets created worthy of looking at. Also, this php file isn&#039;t working for me either even though I have the php5 installed (I&#039;m using Ubuntu Intrepid).

Thanks in advance!</description>
		<content:encoded><![CDATA[<p>Thank you very much for this great piece of code, but you failed to mention a small fact about the need to execute this perl script with su (sudo) privileges and have the html folder created under /var/www/ prior to running it for the first time if using apache2 web server, because that&#8217;s where the resulting polyweather.html file is to be created.</p>
<p>The only thing I haven&#8217;t figured out yet is how to get the weatherbyzip.html to work because all it shows on my web browser is the code that&#8217;s in it, nothing gets created worthy of looking at. Also, this php file isn&#8217;t working for me either even though I have the php5 installed (I&#8217;m using Ubuntu Intrepid).</p>
<p>Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: syn</title>
		<link>http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/comment-page-1/#comment-270</link>
		<dc:creator>syn</dc:creator>
		<pubDate>Thu, 12 Feb 2009 10:23:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.voiptechchat.com/?p=208#comment-270</guid>
		<description>please change 
$urlzip = 1; //allow URL defined zipcode
to 
$urlzip = 1; //allow URL defined zipcode (?z=zipcode)
and delete this comment.</description>
		<content:encoded><![CDATA[<p>please change<br />
$urlzip = 1; //allow URL defined zipcode<br />
to<br />
$urlzip = 1; //allow URL defined zipcode (?z=zipcode)<br />
and delete this comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: syn</title>
		<link>http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/comment-page-1/#comment-269</link>
		<dc:creator>syn</dc:creator>
		<pubDate>Thu, 12 Feb 2009 10:20:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.voiptechchat.com/?p=208#comment-269</guid>
		<description>&lt;code&gt;
&lt;?php
//god
//syn
//original idea: http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/
//Requires PHP 5 or greater

//config:
$zip = 33325; //default zipcode
$showhead = 1; //show header
$urlzip = 1; //allow URL defined zipcode
$cache = 0; //cache
$cachepath = &quot;/var/www/mysite.com/cache&quot;; //cache path (not used if cache == 0);
//end config

//credit where credit is due (class only)
/*
 * Grabs weather data from Google.com&#039;s weather API and return a nicely formatted array
 * @author Ashwin Surajbali
 * @package Redink Design
 * @version 0.9.1
 * @url http://www.redinkdesign.net/google_weather_api_class
 */
class googleWeather{
	public $zip;
	public $enable_cache = 0;
	public $cache_path = &#039;&#039;;
	public $cache_time = 3600; // 1 hour
	private $cache_file;
	private $gweather_api_url = &#039;http://www.google.com/ig/api?weather=&#039;;
	private $raw_data;
	public function get_weather_data($zip = 0){
		if ($zip == 0 &#124;&#124; strlen($zip) zip = $zip;
		}
		if ($this-&gt;enable_cache &amp;&amp; !empty($this-&gt;cache_path)){
			$this-&gt;cache_file = $this-&gt;cache_path . &#039;/&#039; . $this-&gt;zip;
			return $this-&gt;load_from_cache();
		}
		// build the url
		$this-&gt;gweather_api_url = $this-&gt;gweather_api_url . $this-&gt;zip;
		if ($this-&gt;make_request()){
			$xml = new SimpleXMLElement($this-&gt;raw_data);
			$return_array = array();
			$return_array[&#039;forecast_info&#039;][&#039;city&#039;] = $xml-&gt;weather-&gt;forecast_information-&gt;city[&#039;data&#039;];
			$return_array[&#039;forecast_info&#039;][&#039;zip&#039;] = $xml-&gt;weather-&gt;forecast_information-&gt;postal_code[&#039;data&#039;];
			$return_array[&#039;forecast_info&#039;][&#039;date&#039;] = $xml-&gt;weather-&gt;forecast_information-&gt;forecast_date[&#039;data&#039;];
			$return_array[&#039;forecast_info&#039;][&#039;date_time&#039;] = $xml-&gt;weather-&gt;forecast_information-&gt;current_date_time[&#039;data&#039;];
			$return_array[&#039;current_conditions&#039;][&#039;condition&#039;] = $xml-&gt;weather-&gt;current_conditions-&gt;condition[&#039;data&#039;];
			$return_array[&#039;current_conditions&#039;][&#039;temp_f&#039;] = $xml-&gt;weather-&gt;current_conditions-&gt;temp_f[&#039;data&#039;];
			$return_array[&#039;current_conditions&#039;][&#039;temp_c&#039;] = $xml-&gt;weather-&gt;current_conditions-&gt;temp_c[&#039;data&#039;];
			$return_array[&#039;current_conditions&#039;][&#039;humidity&#039;] = $xml-&gt;weather-&gt;current_conditions-&gt;humidity[&#039;data&#039;];
			$return_array[&#039;current_conditions&#039;][&#039;icon&#039;] = &#039;http://www.google.com&#039; . $xml-&gt;weather-&gt;current_conditions-&gt;icon[&#039;data&#039;];
			$return_array[&#039;current_conditions&#039;][&#039;wind&#039;] = $xml-&gt;weather-&gt;current_conditions-&gt;wind_condition[&#039;data&#039;];
			for ($i = 0; $i weather-&gt;forecast_conditions); $i++){
				$data = $xml-&gt;weather-&gt;forecast_conditions[$i];
				$return_array[&#039;forecast&#039;][$i][&#039;day_of_week&#039;] = $data-&gt;day_of_week[&#039;data&#039;];
				$return_array[&#039;forecast&#039;][$i][&#039;low&#039;] = $data-&gt;low[&#039;data&#039;];
				$return_array[&#039;forecast&#039;][$i][&#039;high&#039;] = $data-&gt;high[&#039;data&#039;];
				$return_array[&#039;forecast&#039;][$i][&#039;icon&#039;] = &#039;http://www.google.com&#039; . $data-&gt;icon[&#039;data&#039;];
				$return_array[&#039;forecast&#039;][$i][&#039;condition&#039;] = $data-&gt;condition[&#039;data&#039;];
			}
		}
		if ($this-&gt;enable_cache &amp;&amp; !empty($this-&gt;cache_path)){
			$this-&gt;write_to_cache();
		}
		return $return_array;
	}
	private function load_from_cache(){
 		if (file_exists($this-&gt;cache_file)){
			$file_time = filectime($this-&gt;cache_file);
			$now = time();
			$diff = ($now-$file_time);
			if ($diff cache_file));
			}
		}
	}
	private function write_to_cache(){
		if (!file_exists($this-&gt;cache_path)){
			// attempt to make the dir
			mkdir($this-&gt;cache_path, 0777);
		}
		if (!file_put_contents($this-&gt;cache_file, serialize($return_array))){
			echo &quot;Could not save data to cache. Please make sure your cache directory exists and is writable.&quot;;
		}
	}
 	private function make_request(){
		$ch = curl_init();
		curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
		curl_setopt ($ch, CURLOPT_URL, $this-&gt;gweather_api_url);
		curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER[&#039;HTTP_USER_AGENT&#039;]);
		curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
		curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
		$this-&gt;raw_data = curl_exec ($ch);
		curl_close ($ch);
 		if (empty($this-&gt;raw_data)){
			return false;
		}else{
			return true;
		}
	}
}
//end class
if (isset($_GET[&#039;z&#039;]) &amp;&amp; $urlzip == 1){
	$zip = preg_replace(&quot;[^0-9]&quot;, &quot;&quot;, $_GET[&#039;z&#039;]);
}
$w = new googleWeather();
$w-&gt;enable_cache = 0;
if ($usecache == 1){
	$w-&gt;enable_cache = 1;
	$w-&gt;cache_path = $cachepath;
}
$ar_data = $w-&gt;get_weather_data($zip);
$currtempf = $ar_data[&#039;current_conditions&#039;][&#039;temp_f&#039;];
$currtempc = $ar_data[&#039;current_conditions&#039;][&#039;temp_c&#039;];
$currcondition = $ar_data[&#039;current_conditions&#039;][&#039;condition&#039;];
$todayhigh = $ar_data[&#039;forecast&#039;][0][&#039;high&#039;];
$todaylow = $ar_data[&#039;forecast&#039;][0][&#039;low&#039;];
$todaycond = $ar_data[&#039;forecast&#039;][0][&#039;condition&#039;];
$currhumidity = $ar_data[&#039;current_conditions&#039;][&#039;humidity&#039;];
$currwind = $ar_data[&#039;current_conditions&#039;][&#039;wind&#039;];
$tomorrowcond = $ar_data[&#039;forecast&#039;][1][&#039;condition&#039;];
if ($showhead == 1){
	$city = &quot;\n&quot;.$ar_data[&#039;forecast_info&#039;][&#039;city&#039;].&quot;\n\n&quot;;
} else {
	$city = &quot;\n\n\n&quot;;
}
echo &quot;\n\n&quot;.$city.&quot;\n\n&quot;;
echo &quot;It is &quot;.$currtempf.&quot;&#176;F (&quot;.$currtempc.&quot;&#176;C), &quot;.$currcondition.&quot;. High &quot;.$todayhigh.&quot;, Low &quot;.$todaylow.&quot;, &quot;.$todaycond.&quot;. &quot;.$currhumidity.&quot;. &quot;.$currwind.&quot;. Tomorrow: &quot;.$tomorrowcond.&quot;.&quot;;
echo &quot;\n\n&quot;;
?&gt;
&lt;/code&gt;
Php5 version. Doesn&#039;t require a cron entry.</description>
		<content:encoded><![CDATA[<p><code><br />
&lt;?php<br />
//god<br />
//syn<br />
//original idea: <a href="http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/" rel="nofollow">http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/</a><br />
//Requires PHP 5 or greater</p>
<p>//config:<br />
$zip = 33325; //default zipcode<br />
$showhead = 1; //show header<br />
$urlzip = 1; //allow URL defined zipcode<br />
$cache = 0; //cache<br />
$cachepath = "/var/www/mysite.com/cache"; //cache path (not used if cache == 0);<br />
//end config</p>
<p>//credit where credit is due (class only)<br />
/*<br />
 * Grabs weather data from Google.com's weather API and return a nicely formatted array<br />
 * @author Ashwin Surajbali<br />
 * @package Redink Design<br />
 * @version 0.9.1<br />
 * @url <a href="http://www.redinkdesign.net/google_weather_api_class" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/www.redinkdesign.net/google_weather_api_class?referer=');">http://www.redinkdesign.net/google_weather_api_class</a><br />
 */<br />
class googleWeather{<br />
	public $zip;<br />
	public $enable_cache = 0;<br />
	public $cache_path = '';<br />
	public $cache_time = 3600; // 1 hour<br />
	private $cache_file;<br />
	private $gweather_api_url = 'http://www.google.com/ig/api?weather=';<br />
	private $raw_data;<br />
	public function get_weather_data($zip = 0){<br />
		if ($zip == 0 || strlen($zip) zip = $zip;<br />
		}<br />
		if ($this-&gt;enable_cache &amp;&amp; !empty($this-&gt;cache_path)){<br />
			$this-&gt;cache_file = $this-&gt;cache_path . '/' . $this-&gt;zip;<br />
			return $this-&gt;load_from_cache();<br />
		}<br />
		// build the url<br />
		$this-&gt;gweather_api_url = $this-&gt;gweather_api_url . $this-&gt;zip;<br />
		if ($this-&gt;make_request()){<br />
			$xml = new SimpleXMLElement($this-&gt;raw_data);<br />
			$return_array = array();<br />
			$return_array['forecast_info']['city'] = $xml-&gt;weather-&gt;forecast_information-&gt;city['data'];<br />
			$return_array['forecast_info']['zip'] = $xml-&gt;weather-&gt;forecast_information-&gt;postal_code['data'];<br />
			$return_array['forecast_info']['date'] = $xml-&gt;weather-&gt;forecast_information-&gt;forecast_date['data'];<br />
			$return_array['forecast_info']['date_time'] = $xml-&gt;weather-&gt;forecast_information-&gt;current_date_time['data'];<br />
			$return_array['current_conditions']['condition'] = $xml-&gt;weather-&gt;current_conditions-&gt;condition['data'];<br />
			$return_array['current_conditions']['temp_f'] = $xml-&gt;weather-&gt;current_conditions-&gt;temp_f['data'];<br />
			$return_array['current_conditions']['temp_c'] = $xml-&gt;weather-&gt;current_conditions-&gt;temp_c['data'];<br />
			$return_array['current_conditions']['humidity'] = $xml-&gt;weather-&gt;current_conditions-&gt;humidity['data'];<br />
			$return_array['current_conditions']['icon'] = 'http://www.google.com' . $xml-&gt;weather-&gt;current_conditions-&gt;icon['data'];<br />
			$return_array['current_conditions']['wind'] = $xml-&gt;weather-&gt;current_conditions-&gt;wind_condition['data'];<br />
			for ($i = 0; $i weather-&gt;forecast_conditions); $i++){<br />
				$data = $xml-&gt;weather-&gt;forecast_conditions[$i];<br />
				$return_array['forecast'][$i]['day_of_week'] = $data-&gt;day_of_week['data'];<br />
				$return_array['forecast'][$i]['low'] = $data-&gt;low['data'];<br />
				$return_array['forecast'][$i]['high'] = $data-&gt;high['data'];<br />
				$return_array['forecast'][$i]['icon'] = 'http://www.google.com' . $data-&gt;icon['data'];<br />
				$return_array['forecast'][$i]['condition'] = $data-&gt;condition['data'];<br />
			}<br />
		}<br />
		if ($this-&gt;enable_cache &amp;&amp; !empty($this-&gt;cache_path)){<br />
			$this-&gt;write_to_cache();<br />
		}<br />
		return $return_array;<br />
	}<br />
	private function load_from_cache(){<br />
 		if (file_exists($this-&gt;cache_file)){<br />
			$file_time = filectime($this-&gt;cache_file);<br />
			$now = time();<br />
			$diff = ($now-$file_time);<br />
			if ($diff cache_file));<br />
			}<br />
		}<br />
	}<br />
	private function write_to_cache(){<br />
		if (!file_exists($this-&gt;cache_path)){<br />
			// attempt to make the dir<br />
			mkdir($this-&gt;cache_path, 0777);<br />
		}<br />
		if (!file_put_contents($this-&gt;cache_file, serialize($return_array))){<br />
			echo "Could not save data to cache. Please make sure your cache directory exists and is writable.";<br />
		}<br />
	}<br />
 	private function make_request(){<br />
		$ch = curl_init();<br />
		curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);<br />
		curl_setopt ($ch, CURLOPT_URL, $this-&gt;gweather_api_url);<br />
		curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);<br />
		curl_setopt ($ch, CURLOPT_TIMEOUT, 60);<br />
		curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);<br />
		$this-&gt;raw_data = curl_exec ($ch);<br />
		curl_close ($ch);<br />
 		if (empty($this-&gt;raw_data)){<br />
			return false;<br />
		}else{<br />
			return true;<br />
		}<br />
	}<br />
}<br />
//end class<br />
if (isset($_GET['z']) &amp;&amp; $urlzip == 1){<br />
	$zip = preg_replace("[^0-9]", "", $_GET['z']);<br />
}<br />
$w = new googleWeather();<br />
$w-&gt;enable_cache = 0;<br />
if ($usecache == 1){<br />
	$w-&gt;enable_cache = 1;<br />
	$w-&gt;cache_path = $cachepath;<br />
}<br />
$ar_data = $w-&gt;get_weather_data($zip);<br />
$currtempf = $ar_data['current_conditions']['temp_f'];<br />
$currtempc = $ar_data['current_conditions']['temp_c'];<br />
$currcondition = $ar_data['current_conditions']['condition'];<br />
$todayhigh = $ar_data['forecast'][0]['high'];<br />
$todaylow = $ar_data['forecast'][0]['low'];<br />
$todaycond = $ar_data['forecast'][0]['condition'];<br />
$currhumidity = $ar_data['current_conditions']['humidity'];<br />
$currwind = $ar_data['current_conditions']['wind'];<br />
$tomorrowcond = $ar_data['forecast'][1]['condition'];<br />
if ($showhead == 1){<br />
	$city = "\n".$ar_data['forecast_info']['city']."\n\n";<br />
} else {<br />
	$city = "\n\n\n";<br />
}<br />
echo "\n\n".$city."\n\n";<br />
echo "It is ".$currtempf."&deg;F (".$currtempc."&deg;C), ".$currcondition.". High ".$todayhigh.", Low ".$todaylow.", ".$todaycond.". ".$currhumidity.". ".$currwind.". Tomorrow: ".$tomorrowcond.".";<br />
echo "\n\n";<br />
?&gt;<br />
</code><br />
Php5 version. Doesn&#8217;t require a cron entry.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Use Asterisk, Cepstral, and Perl to Get Parking and Weather Updates &#124; VoIP Tech Chat</title>
		<link>http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/comment-page-1/#comment-193</link>
		<dc:creator>Use Asterisk, Cepstral, and Perl to Get Parking and Weather Updates &#124; VoIP Tech Chat</dc:creator>
		<pubDate>Thu, 08 Jan 2009 23:39:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.voiptechchat.com/?p=208#comment-193</guid>
		<description>[...] Cepstral. Since the parking spots wouldn’t change, maybe the weather would. So, using another script to check the weather, you can modify the results and create a sound file using Cepstral (and swift), such [...]</description>
		<content:encoded><![CDATA[<p>[...] Cepstral. Since the parking spots wouldn’t change, maybe the weather would. So, using another script to check the weather, you can modify the results and create a sound file using Cepstral (and swift), such [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Weather on your Polycom - Team Forrest</title>
		<link>http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/comment-page-1/#comment-190</link>
		<dc:creator>Weather on your Polycom - Team Forrest</dc:creator>
		<pubDate>Tue, 06 Jan 2009 16:56:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.voiptechchat.com/?p=208#comment-190</guid>
		<description>[...] Tech Chat posted a nice little script for putting a quick, no frills weather report directly onto your Polycom [...]</description>
		<content:encoded><![CDATA[<p>[...] Tech Chat posted a nice little script for putting a quick, no frills weather report directly onto your Polycom [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darrick Hartman</title>
		<link>http://www.voiptechchat.com/voip/208/perl-script-to-put-weather-on-your-polycom-microbrowser/comment-page-1/#comment-187</link>
		<dc:creator>Darrick Hartman</dc:creator>
		<pubDate>Tue, 06 Jan 2009 04:29:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.voiptechchat.com/?p=208#comment-187</guid>
		<description>This could easily be adapted to work with Aastra phone displays too.  
&lt;code&gt;


Fred&#039;s Weather


&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>This could easily be adapted to work with Aastra phone displays too.<br />
<code></p>
<p>Fred's Weather</p>
<p></code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
