articles (5)

spamtastic

Dec
20

holy hell, i got comment spammed like crazy today…i got hit with 31 in just the last couple hours…luckily, i’m pretty good about maintaining my list of terms to block in wordpress, so none of them got through…one thing that was really interesting about this batch of spam was that the spammers are definitely getting more sophisticated…some of them had text of 4-5 sentences that could almost look like a real comment if you didn’t look very carefully…for example:

The life of man is the life of a moving being, and it would not be sufficient for him to develop body alone. A plant is rooted: it stays in one place and cannot move. It would be very surprising, therefore, to discover that a plant had a mind; or at least a mind in any sense which we could comprehend. If a plant could foresee or project consequences, the faculty would be useless to it. What advantage would it be for the plant to think: ‘Here is someone coming. In a minute he will tread on me, and I shall be dead underfoot’? The plant would still be unable to move out of the way. All moving beings, however, can foresee and reckon up the direction in which to move; and this fact makes it necessary to postulate that they have minds or souls. by texas holdem

crazy, they keep getting better techniques, and we keep playing catch-up trying to block them…

post titles

Nov
16

check out my new post titles…i found a nice little WordPress plugin to replace post titles with images, via Matt…after i messed around with the plugin a little, i got it working and i think the post titles match the font on the rest of my site a little better now…

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