Nike+iPod update: version 1.4.1
February 17, 2007 – 12:13 amNot sure what is going on with Nike, but they are returning PIN data with every query now. This messes up the results and creates cases where you will see divide by zero errors. I’ve added conditionals to check for the zero, and to check for the extra data and remove it so that things can be processed like before. Clear your cache before checking the stats with this new script.
You can get the new version here.
Sphere: Related Content
7 Responses to “Nike+iPod update: version 1.4.1”
When I clcik on your Nike page button, I get the unlogged page. Same with me: when I am logged in with my firefox it gives the stats. otherwise just the start page.
Is there a way to get Eric Byers’ stats in the code?
Geert
By Geert on Feb 17, 2007
I hope to get back to this code this week and integrate a lot of the features that have been requested. Just to give proper attribution that the code you mention is actually from http://www.ear-fung.us/apps/nikeplus/. I have some sample working code at http://www.shokk.com/nikeplus3.php from his code which has been generalized to avoid the WP functions. I think with a little more work that code can be generalized so that a wrapper script can just include it. At that point my code is completely unnecessary and we can just build on those exposed functions.
By Ernie Oporto on Feb 18, 2007
Actually, it was easier to move to Wordpress than to continue supporting PHP in my Rails based Typo blog. =)
Just get the code from http://www.ear-fung.us/apps/nikeplus/ from now on, as he is going to be doing some cool things with it, and will be adding non-Wordpress use in the coming months.
By Ernie Oporto on Feb 22, 2007
It seems your script is still the only non-wordpress-php-less-than-5 NikePlus script. It’s excellent, and I’m trying to integrate it into my site. Do you have any plans to continue supporting this script? Has the XML Nike returns changed since your version 1.4.1? I can get the script to run, connect to Nike and write the tmp XML files without issue. It just seems the script can’t read my files.
nike_user.xml
/nikeplus/v1/services/app/get_user_data.jhtml?login=XXXXX&password=XXXXX&locale=en_us
Attempting to retrieve file nike_user.xml from Nike+
AUTH: https://www.nike.com/nikeplus/v1/services/app/generate_pin.jhtml?login=XXXX&password=XXXXX&locale=en_us
Auth call to Nike+ successful
success XXXXXXX-XXXX-XXXXXXX Valid data retrieved from Nike+
Caching Nike+ file locally
Using cache file nike/nike_user.xml
Could not get Nike+ Data
Opening up nike_user.xml, it appears the file was written missing the opening XML declaration as well as the opening [plusService] and [user] elements. Same goes for nike_goals.xml. It’s missing the first part of the document and can’t be read.
Thanks for any insight. Again, great little script!
By hudson on Mar 14, 2007
I don’t have any plans to keep supporting this. The author of the original script plans to make it work with non-Wordpress setups. As to the PHP4 compatibility, his Wordpress current script is working OK on my PHP4 setup, so it’s just a matter of changing a few lines. I’ve actually already done that job of making that non-wordpress compatible, so let me get that code packaged and I’ll put it out for download.
By Ernie Oporto on Mar 14, 2007
Thanks a heap! It’s a great script– just like your Prank for Mint.
By hudson on Mar 15, 2007
You can get the new script at http://www.shokk.com/downloads/nikeplus3.pht
Fill in the NIKELOGINNAME and NIKEPASSWORD, and twiddle the flags immediately below that to customize your view.
By Ernie Oporto on Mar 15, 2007