articles (3)

WP iTunes v1.1

Apr
25

i just got done finishing the newest version of WP iTunes, for those of you who come here for that kind of stuff…for anybody who missed it, here is the original post about WP iTunes…i added a couple cool new things for the new version, including support for the cURL libraries for retrieving the Amazon album art (needed for some webhosts that have disabled remote file opening, including Dreamhost), and caching of the retrieved album art locally, so things can be sped up a little, and so the art doesn’t have to be pulled from Amazon every time…so, download the newest version, check it out and let me know if you have any problems…

Download WP iTunes v1.1 here

new scripts

Nov
11

so, i’ve finally got some script examples added to my ’scripts’ section…SearchNow is a searching technology, featured on my site, that anybody can use to add live searching to their site…WP iTunes is also featured on my site, and allows WordPress users to display currently playing songs in iTunes on their blogs…if either of these sound useful to you, download them and check ‘em out…peace

PHP Lesson on the ‘include’ statement

Oct
25

I got a nice little lesson in PHP this morning…I’d been noticing that since last night, my front page had been loading really slowly, maybe 15-20 seconds to load just the main page…I figured it had something to do with some RSS feeds that I was parsing and displaying on my front page, maybe MagpieRSS wasn’t caching the feeds right, or I hadn’t set permissions on the cache directory correctly…I added some logging to my page, and started pouring over the results…I basically pinpointed it down to one line, which was this include statement:

  1. //If you don't know, get_settings('siteurl') is a WordPress function to get the URL of your site…
  2. include(get_settings('siteurl').'/includes/magpieRSS/rss_fetch.inc');

apparently, this call was taking 20 seconds to resolve…so I simply removed the get_settings call from the include and just made it:

  1. include('includes/magpieRSS/rss_fetch.inc');

and magically, my page was back to functioning normally…evidently, by forcing the include to try and use the full URL path to the file, instead of a more direct relative path, I was killing the performance of my page…so yeah, I guess the point was, learn from my mistakes and don’t do that in your include statements…

  • written by: Nick @ 2:36 pm on Oct 25, 2004
  • categories: PHP, Wordpress
  • viewed: 2685 times
  • comments: 6 Comments