URL examples
We have many kind of URL shortcuts. Here are some examples you can try out:
You can find more quick reference tips on our site.
'; commonHeader("URL Howto"); ?>We have found, that many of our users would like to access the information on our site very quickly, so we decided to implement a system, where there is even no need to write something inside a search box, you can type in php.net URLs to access pages.
Note, that these shortcuts are expected to work on all mirror sites, not just at the main site. If you find that some of these shortcuts are not working on your mirror site, please report them as a "PHP.net Website Problem" at http://bugs.php.net/.
There are currently three types of URLs you can use this way. For the examples, we'll use the main site URL.
If you write in a php.net URL, like http://php.net/links, first this URL is matched against the php.net pages. If there is a page named links.php, then you'll get that page immediately. This type of shortcut makes easy to type in a link in an IRC conversation or mailing list message. If the script finds no page with this name, it tries to find a manual page.
If your URL can't be matched with a page name, a manual page is searched for your query. This is the case for the http://php.net/preg_match URL. The following pages are searched for in the manual:
This kind of URL will bring up the manual page in the mirror's default manual language. This is English for the main site, but can be a wide range of languages, depending of the mirror's setup. You can see the list of languages used by mirrors at http://php.net/mirrors. This way if you would like to get an Italian manual page for your queries, you can type http://it.php.net/echo.
There is another method though for accessing the manual page in your preferred language. You can embed the language in the URL before the manual search term. http://php.net/hu/echo will bring up the Hungarian manual page for echo for example.
At last, if there is no PHP page, and there is no manual page matching your query, a search is issued on the site with the query you typed into the URL. An example of this kind of URL is http://php.net/search_for_this.
What enables PHP.net to have this feature is a combination of a custom ".htaccess" file, which redirects the browser to another page in case of an "Error 401/3/4" and a little search page that looks up page names or functions names in the manual corresponding to what you searched for in http://php.net/search_for_this.
Everything behind this feature is available here: