Thursday, July 30, 2015

custom fonts using css?

Some new websites that are using custom fonts on their sites (other than the regular Arial,Tahome).
Generically, you can use a custom font using @font-face in your CSS.

Here's a very basic example



Link for download good Font  


fontsquirrel.com 

Google Fonts



I hope that helped!

NOTE :


our font is cross-browser compatible, make sure that you use this syntax:

@font-face {
    font-family: 'Comfortaa Regular';
    src: url('Comfortaa.eot');
    src: local('Comfortaa Regular'), 
         local('Comfortaa'), 
         url('Comfortaa.ttf') format('truetype'),
         url('Comfortaa.svg#font') format('svg'); 
}
 
 
 

Wednesday, July 22, 2015

Remove Index.php From URL in CodeIgniter

How To Remove Index.php From CodeIgniter in Windows Xampp

Follow This Step
1. First check mod_rewrite is enabled or not
2. To check this create php file type in that



3. Run into browser
4. Search for the mod_rewrite if you will find that in loaded module then its enabled else you have to enabled this mod_rewrite
5. After that create .htaccess file in your root folder of codeigniter
6. Copy this below codeand paste into that .htaccess file


7. After that change into the config.php of codeigniter

$config['index_page'] = 'index.php';    
    to      
 $config['index_page'] = ' ';                 

8. Here you done now run the file with index.php using url http://localhost/ci/welcome



-----------------------------------------------------------------------------------------------
you would also like 

 Interview Question [PHP] 

How to create JSON using MySql Database [PHP]




Thursday, July 9, 2015

PHP7 whats new ?

The name for the next major PHP version has been finalized! The winning proposal is to call the latest major version PHP 7.

With the planned date for PHP 7’s release rapidly approaching, the internals group is hard at work trying to fix our beloved language as much as possible by both removing artifacts and adding some long desired features.

The latest PHP version will be released later this year

The PHP 7 Timeline RFC was approved in a near unanimous vote, and aims to release PHP 7 in October 2015.
Time line

PHP Space Ships

PHP 7 will introduce a new operator <=> conveniently

Add a new operator (expr) <=> (expr), it returns 0 if both operands are equal, 1 if the left is greater, and -1 if the right is greater. It uses exactly the same comparison rules as used by our existing comparison operators: <, <=, ==, >= and >.

[DEMO]


Return Type Declarations & Scalar Type Hints

 
PHP 7 will allow developers to declare what kind of return type a function is expected to have – similar to argument Type Hints.
In addition, argument type hints and the new return-type declarations now support new scalar types, allowing developers to denote that they’re expecting strings, floats, ints or bools to be passed or returned

PHP 7 Performance


PHP 7 is based on the PHPNG project (PHP Next-Gen), that was led by Zend to speed up PHP applications.

PHP 7 is 2X faster

Since PHPNG was open sourced and later merged into PHP 7, its performance more than doubled in many cases, and we’re continuing to improve it all the time.

What is PHPNG



phpng's key benefits are around performance and memory utilization. Detailed performance benchmarks against previous (and current) versions of PHP, as well as hhvm,

What is hhvm

HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP. HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining the development flexibility that PHP provides.




Friday, July 3, 2015

Improve Apache Web Server Security

Improve Apache Web Server Security: Use ServerTokens and ServerSignature to Disable Header
When Apache HTTPD web server generates any web pages or error pages, some important information about the version and other details implemented on the system are displayed in the web site server header.

IE: Server: Apache/2.0.53 (Ubuntu) PHP/4.3.10-10ubuntu4 Server at xx.xx.xx.xx Port 80

Fix possible security issue, modify these two directives ServerTokes and ServerSignature in httpd.conf configuration file.

To ensure that the Apache HTTP web server does not broadcast this message to the whole world publicly and fix possible security issue,

modify these two directives

  • ServerTokes
  • ServerSignature

In httpd.conf configuration file.

Login as root user or perform a sudo to the web server.

Open and edit httpd.conf or apache2.conf (in Apache 2) with vi or other text editor. The Apache configuration normally located in /etc/httpd/conf/ or /etc/apache2/ or /etc/apache/ (for Apache1.3) depending on which Unix you’re using.

Locate the line with ServerTokens. You can perform a search by typing “/ServerTokes” and hit Enter.

In Apache 1.3, you will likely to see a line starts with #ServerTokes Full In this case, remove or delete the # character (by pressing d key).

Also modify the Full to become Prod (press r key to replace one character, or R to replace multiple characters), so that the line becomes ServerTokens Prod. 

In Apache 2.0 or 2.2, the line normally does not exist. So the search will fail. In this case, go to the bottom of config file, and add the new line with the following text. You can add new line by pressing o key.

ServerTokens Prod

Next, search for ServerSignature. In Apache13, the line should just above the line of ServerTokens. Edit the line so that it looks like this, and in Apache2 which doesn’t already have this line, add in at new one.

ServerSignature Off

By now the Apache configuration file should have this two directives set as below:

ServerSignature Off ServerTokens Prod


The first line “ServerSignature Off” instructs Apache not to display a trailing footer line under server-generated documents (error messages, mod_proxy ftp directory listings, mod_info output, and etc) which displays server version number, ServerName of the serving virtual host, email setting, and creates a “mailto:” reference to the ServerAdmin of the referenced document.

The second line “ServerTokens Prod” configures Apache to return only Apache as product in the server response header on very page request, suppressing OS, major and minor version info.

Save and close the config file by pressing Shift-Colon, and then type “wq” keys, and hit Enter.
Restart Apache. Typical command is 

service httpd restart or /etc/init.d/apache2 restart.

Now, you will get only the Apache in the server response header:

Server: Apache


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


How to Host a Laravel Project on Hostinger’s hPanel: A Step-by-Step Guide

How to Host a Laravel Project on Hostinger’s hPanel: A Step-by-Step Guide If you're looking to host a Laravel project on Hostinger’s hPa...