can you tell if a site is made with cakephp, how,
how to check it - to check any folders, initial pages , to see some specific queries ?
Maybe this CMS detector can help you. HTTP headers in many cases reveal a lot about technology used to power a site.
1) find a form on it, if it has values in the format data[Something][whatever] chances are its cake
2) url format is normally /something/anotherthing/id and a lot of times there will be some urls like /pages/something, also wont often find extentions in the url
3) check the name of the main css file, some people wont change it, cake.default.css iirc
4) try going to a random url and see what the error looks like, default cake will be something like "Error: The requested address '/sdfsdfsfsd' was not found on this server."
5) if the url is site.com/something/etc and you can go to site.com/index.php?url=/something/etc
obviously these can all be done on any system, but its a pretty good giveaway if the all/mostly work
You can use WhatWeb which is created for this purpose and has a plugin for cakephp.
You can use the tool I made called PageXray, it can detect CakePHP apps.
http://pagexray.com
It uses some quick Curl techniques to check if files exists, if some css or images are in webroot and also checks the page's header for some CakePHP signatures.
Then for a list of sites that was made with cakephp, check this out.
http://pagexray.com/technologies/php_cakephp.htm
Related
I am very curious on how to make a site built using php and mysql. When i try to retrieve username from mysql how can i format it like this, very similar to facebook or twitter (note: i am not making social networking site here, i just like the idea and i think it is very helpful)..
mydomain.com/username
at first, i thought i should make a sub-directory to all the usernames.. but wait, what if i have tons of usernames in the database how can i make directories in each usernames? so i think somebody might help me here..
or like on a blog.. how can i make the title of the post like this:
mydomain.com/title-of-the-post
i'm new to php..
you can freely edit this question if this is ambiguous or not easy to understand i just can't find the exact word for this..
You need a router [e.g. klein], and to apply the Front Controller Pattern in order to route all incoming requests to the entrance of your application.
No directory nor filesystem should be involved at all.
You write a PHP routine to parse the URL.
So that the URL reaches the PHP routine, you make all /username, /title-of-post etc point to this routine using .htaccess - typically directing all traffic for anything that doesn't exist as a file or directory to your index.php file.
I am wondering if this is possible with PHP, or if not with ASP since it's relatively similar and I could pick it up quickly. Let's say I have a text input for a user to search a database; as an alternative to using the text field I want a user to be able to go to 'www.examplesite.com/SEARCHTERM'. Is this possible? I've seen it done, but I can't figure out how. Thanks!
You might have to look in to url rewriting based on the server you use.
URL Rewritting
This can be done:
1) Using $_GET
www.examplesite.com/?SEARCH=SerachTermHere
In the page you can get the search variable with $_GET['SEARCH']
2) Using URL Rewritting
Yes that's easily possible. For example if you have apache server then you can enable mod rewrite and write one rule to redirect all such requests to your script in a variable and it will then handle accordingly
It is possible, you have two options.
Using URL Rewritting in your server configuration.
Using $_GET global. Everything in URL after your actual page address is available through $_GET.
This goes a bit beyond your question but might prove to be very useful. Even though it is a framework, you might want to look at Symfony 2 routing for ideas how to implement it. Specifically at "Under The Hood" section. You can even explore their routing code on github. Applications made in it have exactly the form you are searching for (content displaying based on $_GET data).
I am struggling to find this as I'm not sure exactly what I'm looking for!
I've seen that some sites seem to use 'subfolders' as links to pages, e.g. wikipedia.
E.g. Let's say I had a record in a database with a unique title "My Shopping List". I want to be able to navigate to www.mySite.com/my_shopping_list and have it automatically 'forward' to a page showing the relevant record.
I am using IIS and wondering if there's a way I can do it with that, but I may be looking in the wrong place.
This is for a knowledgebase where I might write an article called "how to use a computer" and would like to be able to create a 'friendly' link for users (http://www.mySite.com/how_to_use_a_computer rather than http://www.mySite.com/article.php?ID=123. I will need to be able to create these 'links' dynamically using the title field.
Thank you
EDIT: I am using IIS6
You should use URL Rewrite, the microsoft ressource for this technique is here: http://www.iis.net/download/urlrewrite
In the iss forum the issue about url rewrite in iss < 7 is discussed with some suggestions on software to use.
I don't know which one is best, maybe there are others who know:
http://iirf.codeplex.com/
http://www.isapirewrite.com/
http://urlrewriter.net/
With PHP, you'll need to code URLConf using something like a htaccess file or the manager GUI. You can read ISS docs on URL rewrite to learn how., but as I understand, this is a module you'll have to download separately.
This question also shows how do do it without editing server configuration files or htaccess, but you'll be stuck with a http://example.com/index.php/path/to/view format (where index.php is a real script with the URLConf in it.)
Well some time ago it was used to call 'Friendly URL' or 'FURL', now i see that it's ust Rewrite URL. Look for tutorials for beginners.
I am buildiig a simple CMS and would like to know how to create short URLs (not the APACHE bit but the PHP bit).
example.com/?page=100
example.com/home/test
How would I interpret the ?page=100 into /home/test (Through select the database, but i couldn't figure out how) I can see if just one level /home/test because you probably can have a zoneID, but when it comes to /home/test/test. I become lost
And how do I parse back the /home/test to the page id.
Plus is there anyone can show a bit idea for the database design as well?
These resources can be useful to you:
https://stackoverflow.com/a/120411/370290
http://www.symfony-project.org/book/1_0/09-Links-and-the-Routing-System
http://codeigniter.com/user_guide/general/urls.html
http://www.phpaddiction.com/tags/axial/url-routing-with-php-part-one/
You need some kind of mod_rewrite for your server side.
That will help you to send route data to index.php (or somewhere else) file without filename in adress string. Than some php file will analyze the route and give correct html.
ok i think you need to definitely need to look at the way you are going to do your routing (through mod_rewrite)..for example
1.you can rewrite the page www.example.com/test to ..www.example.com/index.php?page=test and implement a way of getting page by the page name..and returning an id if a page name exists ..if multiple entries exist then maybe the last modified will be given precedence over the otheers ..you can get the following book CMS Design Using PHP and jQuery helped me alot
Is there any method in Php by which I can create a page automatically based on a predefined template. Like if we create a new post in blogger it automatically creates page for that post with the name of that post, like this one:
http://learntoflash.blogspot.com/2009/12/exit-button-in-flash.html
Here Exit Button In Flash is the name of my post I have written and an automatic page is created for it.
Or like here on this website if we ask a question it automatically creates a page for that question. I want to know can I achieve this in Php or anything close to this ?
...here on this website if we ask a question it automatically creates a page for that question.
It sounds like you may believe an actual file is created when you post a question. My bet would be that this page is generated via the question id in the URL.
The only files created would be cached output, which may or may not resemble actual HTML pages.
You should use URL rewriting. This Apache module lets you define rules to rewrite web addresses in your desired way.
The process to make your web application ready for this, is not a short story so you should read more about it.
This article is a good starting point:
http://articles.sitepoint.com/article/guide-url-rewriting
This is acheived by using mod_rewrite. A good place to look for inspiration is the .htaccess used in Wordpress.
to something like that you have to grasp the very fundamental in php or any programming language at all, i mean the core of php is to create dynamical generated pages based on user/browser input.
You might need to take a quick tutorial about php might I suggest http://www.tizag.com/phpT/
good step for step tutorial
Edit:
if you're wondering how the websites seems to have created a html page for every question, the answer would be they're not they are probably using mod_rewrite as mentioned before to rewrite to url to print a little more user friendly url, the actual url could be something like this https://stackoverflow.com/index.php?post=4499289 in reality