News Feed
Sections
News Archive


Community Events






feed this:

Hasin Hayder's Blog:
Web scrapping in a smart way, making a "Today in History" object in PHP
0 comments :: posted Tuesday April 29, 2008 @ 10:27:41
voice your opinion now!

Hasin Hayder has written up a quick tutorial for his blog that shows how to create your own "Today in History" page with details from Scopesys pulled with a little web scraping.

There are thousands of services available on web who are presenting interesting as well as education information which you can really integrate in your web page or make a nice widget and let others use them seamlessly with their content delivery platforms. In this article I am going to show you how you can make a nice Today-in-History widget with the help of the data provided in Scopesys.

He wisely recommends that you check one thing first about the content you're grabbing - the copyright it carries with it. This could get you into big trouble down the line depending on whose content it is. The actual script is pretty simple - he defines some constants as markers for where things start and stop in the HTML and then uses strpos to get the locations for his substr call to grab the segments.

tagged with: todayinhistory widget copyright scopesys constant define substr strpos


Vidyut Luther's Blog:
Where do you "define" your environment/global settings?
0 comments :: posted Friday January 20, 2006 @ 06:44:36
voice your opinion now!
From Vidyut Luther today, there's this new post that asks the question "Where do you 'define' your environment/global settings?"

I was wondering how people handled this situation themselves. I'm personally trying to decide whether my constants be in the class files, or a global configuration file. Right now I have a global.conf.php which contains things like (MySQL login info, include paths, table names).

So, my question is: Is it better to have one big configuration file, or should some things be defined on top of the individual classes ? (CONTACTS_TABLE.. is a clear example). I see pros and cons for both approaches.

He lists out pros and cons for the "one file approach" versus the "multiple specific definitions" method, for example:

  • simple editing vs. easier to manage
  • a single large file vs. multiple small files
  • high memory usage on every page vs. lower memory consumption from loading only what's needed
tagged with: php define global settings multiple file single large small php define global settings multiple file single large small


framework package mysql zend code application developer security conference job database releases PHP5 zendframework pecl PEAR cakephp release ajax book

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework