Posts Tagged ‘code’

Codeigniter – Clean URLs – Apache mod rewrite : Removing /index.php/ from URL in CodeIgniter Application

// August 22nd, 2008 // 8 Comments » // Articles, CodeIgniter, Frameworks, PHP, Web Development

OK readers, here is a simple method to achieve clean urls with your PHP application developed in CodeIgniter.

Please note that this method is applicable only to applications developed in CodeIgniter. Much of the content has been taken from CodeIgniter wiki but rewritten in my own way. (more…)

Mining the Web using PHP

// March 4th, 2008 // 2 Comments » // Databases, Open Source, PHP, Web 2.0, Web Development, Web Development Software, data-mining

There are many ways for Extracting or fetching desired data or content from an html pages. During my work, i had to build a Miner to get news from multiple sites & update a wordpress blog with the latest news, daily.I had many choices to accomplish this task, few of them are
- Regular expressions
- PHP string functions.
- Using DOM Parsing
- Using Xpath.

First of all i used regular expressions to (more…)

CodeIgniter: How to set your images path automatically for your site

// February 13th, 2008 // No Comments » // CodeIgniter, Open Source, PHP, Web Development, Web Development Software

Well I was thinking that the old source code I got from the other guy Nouman who was working on this Home Work Center Project that was and is being coded in CodeIgniter was not very much upto date. I fixed the Javascript issues; in fact a lot of them including the JavaScript date picker calendar. It fits well, works on IE 6, IE7, Safari and Firefox; haven’t yet checked with others. But I am sure it will!. Anyhow the problem I was facing was that in different folders in Views for CodeIgniter , if we are using images, we have to use relative URLs in most of the pages, which gets quite troublesome sometimes. As long as it is the CodeIgniter I am working on, I don’t want to use my own includes having setting of the site because this is why we are using CodeIgniter .

Solution:

So cutting short the details, if you want to use the site’s URL and relative paths according to your site’s base url, here is the solution use site_url(). The link contains all the details you will need to use for your views and it also tells which helpers you need to load.

A very good article for Screen scraping any webpage into RSS

// February 1st, 2008 // No Comments » // Open Source, PHP

I was looking for screen scraping a site for getting the download links off the site and I found this intersting tutorial. It makes you able to  get the content from a page and make it into RSS. Easily customizable thing. Just go for it. (Link on the full post.) (more…)