jason257 Posted February 2, 2009 Report Share Posted February 2, 2009 Hi there, i have to make project for my school which is to be clone of blogspot in PHP. i have no clue of as to how blogspot gives unique url ("myblog.blogspot.com") to its users, does it create new files for each user using information provided or stores all data in database and then recreates user's pages when required. Please help me out,i am in desperate need of it. Thanx Quote Link to comment Share on other sites More sharing options...
Wickham Posted February 2, 2009 Report Share Posted February 2, 2009 Blogger creates sub-directories for each user and it calls them myblog, etc. and it's formatted in this case as myblog.blogspot.com but in some cases it could be blogspot.com/myblog but they have chosen to format it before their own domain name. The input data entered by the blogger is always held in a database and fed to the page. Quote Link to comment Share on other sites More sharing options...
monkeysaurus Posted February 2, 2009 Report Share Posted February 2, 2009 Just to be absolutely clear, an address like http://myblog.blogspot.com is usually a subdomain, rather than a subdirectory. I say usually because it is possible to use mod_rewrite and other rewriting scripts to rewrite sub-domain URIs to subdirectories (although it isn't very common in my experience.) And yes, the information about each blog will be held in the database. A templating system will be used and the blogger's posts and other information will be inserted at appropriate points. Hope that makes sense. Quote Link to comment Share on other sites More sharing options...
jason257 Posted February 2, 2009 Author Report Share Posted February 2, 2009 Thx alot for replies, but if blogger's posts are stored in database then why when i click any of previous posts page opened seem like it is stored as page. example:- Say if i click at any of the links in the sidebar of "http://myblog.blogspot.com" the page opens with address "http://myblog.blogspot.com/title-of-post.html". shouldn't it open a standard page like "post.html" for all the links in the sidebar, afterall if all data is being inserted at being requested then css for design could also be added then and all the posts belonging to same blog should open with same address. Thanx Quote Link to comment Share on other sites More sharing options...
falkencreative Posted February 2, 2009 Report Share Posted February 2, 2009 It's quite possible that they have some sort of URL rewriting system in place that sorts things and performs certain actions based on the URL. You can't blindly trust the URL -- it may actually have nothing to do with the real page that is being used. Quote Link to comment Share on other sites More sharing options...
monkeysaurus Posted February 2, 2009 Report Share Posted February 2, 2009 I'd actually go further than Ben; these days, almost every site more complex than a 6-page static html site will be using some type of framework that will allow 'pretty' URLs. (Or more properly in a technical context, URIs.) For example; Joomla, Wordpress, Ruby on Rails, Django, CakePHP, Codeigniter, ASP.NET MVC - they all allow URL manipulation out of the box. Heck, you can even take a look at the URI of this page for an example! URIs these days bear almost no relation to files on a computer, as they might have done in the past. Quote Link to comment Share on other sites More sharing options...
jason257 Posted February 3, 2009 Author Report Share Posted February 3, 2009 Thx alot for help, you people are great. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.