PHP get class name without namespace

PHP get class name without namespace

Below is the simple function to get class name without namesapce. public function getClassName() { $path = explode('\\', __CLASS__); return...

PHP Code Snippets - 2 years ago

How to capture screenshot of website with a URL using PHP

How to capture screenshot of website with a URL using PHP

In this post, we gonna write a simple PHP script to grab given website URL screenshot. So let's create an...

PHP / MySQL - 3 years ago

Ajax Login form using PHP and MySQL

Ajax Login form using PHP and MySQL

Today I would like to show you Ajax login functionality implementation using PHP and MySQL. We gonna use MySQL PDO...

PHP / MySQL - 3 years ago

Add Watermark on Images using PHP

Add Watermark on Images using PHP

One of the most common approaches to brand/protect images is watermarking. Here I would like to show you how to...

PHP / MySQL - 3 years ago

PHP - How To Check Number Is Odd Or Even

PHP - How To Check Number Is Odd Or Even

Here is simple PHP code snippet to check if a given number is odd or even. Check Number Is Odd...

PHP Code Snippets - 3 years ago

Assign PHP value to JS

Assign PHP value to JS

//here we have one php variable //In javascript/jQuery var spge = ''; // need to put single/double quote there for...

PHP Code Snippets - 4 years ago

Check AJAX Request using PHP

Check AJAX Request using PHP

if(!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') { /* This is one ajax call }

PHP Code Snippets - 4 years ago

Remove specific value from array using php?

Remove specific value from array using php?

This post shows the possible ways to remove specific element from array based on value of the element. Removing specific...

PHP / MySQL - 4 years ago

Reading RSS Feed with PHP

Reading RSS Feed with PHP

This article shows how to read RSS feeds using php script. If you are reading this post you might know...

PHP / MySQL - 4 years ago

PHP get function arguments as array?

PHP get function arguments as array?

func_get_args() returns an array with all arguments of the current function. PHP5.6 - splat operator Arrays and Traversable objects can...

PHP Code Snippets - 4 years ago