PHP Classes

PHP Site URL: Get URLs related with the current request site

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 142 All time: 9,191 This week: 673Up
Version License PHP version Categories
php-site-class 1.0.1MIT/X Consortium ...5HTTP, PHP 5
Description 

Author

This class can get URLs related with the current request site.

It checks the current HTTP request values and returns several types of URLs related with the current site. Currently it can return:

- Site URL
- Current page URL
- Current site http or https protocol
- Server name
- TCP port
- Current request Uri
- An array with the URL path split in parts separated by the slash character : /
- Etc.

It can also redirect the current request to another URL, or the previous page using the referrer URL.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq <contact>
Classes: 52 packages by
Country: Pakistan Pakistan
Innovation award
Innovation award
Nominee: 6x

Documentation

PHP Site class

This class can get URLs related with the current request site.

Feature

This class can get URLs related with the current request site.

It checks the current HTTP request values and returns several types of URLs related with the current site. Currently it can return:

  • Site URL
  • Current page URL
  • Current site http or https protocol
  • Server name
  • TCP port
  • Current request Uri
  • An array with the URL path split in parts separated by the slash character : /
  • Etc.

It can also redirect the current request to another URL, or the previous page using the referrer URL.


  Files folder image Files (5)  
File Role Description
Files folder imageclasses (1 file)
Accessible without login Plain text file index.php Aux. Auxiliary script
Accessible without login Plain text file init.php Aux. Auxiliary script
Accessible without login Plain text file LICENSE Lic. create
Accessible without login Plain text file Readme.md Doc. Documentation

  Files folder image Files (5)  /  classes  
File Role Description
  Plain text file Site.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:142
This week:0
All time:9,191
This week:673Up