Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Everything / Languages / PHP

PHP

PHP

Great Reads

by zebulon75018
Edit Bootstrap Menu by json schema in PHP
by W∴ Balboos, GHB
How to open a desktop application from a browser
by Mosso Hosting Cloud
After experiencing scaling issues with their previous hosting provider, the founders of the #1 iPhone tutorial site turned to Mosso, Rackspace’s cloud hosting division, because of the company’s tech support, scalability and affordability.
by Jakub Míšek
"dynamic" keyword and PHP object

Latest Articles

by zebulon75018
Edit Bootstrap Menu by json schema in PHP
by W∴ Balboos, GHB
How to open a desktop application from a browser
by Mosso Hosting Cloud
After experiencing scaling issues with their previous hosting provider, the founders of the #1 iPhone tutorial site turned to Mosso, Rackspace’s cloud hosting division, because of the company’s tech support, scalability and affordability.
by Jakub Míšek
"dynamic" keyword and PHP object

All Articles

Sort by Score

PHP 

by W∴ Balboos, GHB
How to open a desktop application from a browser
by Right Handed Monkey
Tips for choosing between '==' (equals or loose comparison) and '===' (identical) operators in php.
by Michael Bergman
Using Windows Communication Foundation to build a simple web server
by Nikunj_Bhatt
Image can also be shown without specifying its extension in HTML doc if it is on server
by Oso Oluwafemi Ebenezer
Generating an internet shortcut for your website from the server side
by Zamshed Farhan
A simple class in PHP to calculate the weight of file
by Mostafa Asaduzzaman
How to access files within the application using DI
by Peter Leow
This is a simple web application to illustrate visually the difference between Ajax and non-Ajax calls that take place all in a single web page.
by Friedrich Rehren
This tip shows you how to validate Requests by Alexa according to the Amazon requirements.
by Frozen Rain
There is a simple way to consume WCF from clients which do not support Microsoft's SOAP implementation. It is achieved by using REST to accept data and convert REST calls to SOAP calls with the PHP Framework.
by Peter Leow
Get your database to generate unique running IDs for your application
by Weberto.com
XMLHTTP solution for multiple XML Wow Armory requests
by Masoud Ehteshami (Iran)
main source : https://www.jqwidgets.com
by caoym
A lightweight, easy-to-use and jax-rs-like PHP library for building RESTful Web Services
by koula7
Introduction...
by fly904
You can wrap the functions into a class and use the default class life cycle to your advantage.<?phpclass Cache{ const DIRECTORY = '../cache/'; const TIME = 600; protected $cache_directory; private $using_cached_file = false; public function __construct( $cache_directory =...
by Rockyonfire
You should not define the object identifyer at the top of each page (because then you have to write out the same bit of code each time u want to access a object within a class.- (Insted Use a included class)Cachecache_class.phpExample Classclass Cache {function...
by Rockyonfire
I wrote the script using a basic class with the intention of simplifying the Cache proccess doing so allows new features to be added without having to deal with complex code.Because we have a identifyer which can be used to check if the "function" is functional or not we can now indicate the...
by Nathan Stiles
Calling CL programs on the IBM i on Power from PHP using DB2 stored procedures.
by caprico.caprico
With this class we try to catch some keywords from google, yahoo and bing search engines.<?phpclass keywords{ private $referer; private $_e; public $keywords; public function __construct() { if($_SERVER['HTTP_REFERER']) { ...
by fly904
There is a bug with your regex.Say for example that you were refered to by google.uk/search?q=example&ie=utf-8, your code would return 'example'. If, however, you were refered to by google.uk/search?q=example, it would return 'oops'.The simple fix is to change the limitation variable from...
by Andre' Gardiner
Censoring any word from a given list (array) to filter your web content(s).
by Imran N
The following piece of code will calculate the last visited time of a Member/User and calulate the time difference with the current time.
by jerry_wangjh
In this article, we compared different HTTP libs in PHP, and how to use them
by Rony Sur
Sometimes it is required to display the number of page views of blog posts, discussions, or other pages. This is how to do it.
by Tareq_Gamal
Control Anything from a web page using sockets and ports.
by Oso Oluwafemi Ebenezer
How to convert numbers [-((1x10^64)-1) up to (1x10^64)-1] to their word equivalent (i.e. -123.45 becomes Negative One Hundred And Twenty Three Dot Four Five)
by Member 4206974
A PHP class that uses PDO for creating a table from JSON Objects
by Rogai Lorenzo
How to create a web panel for your application.
by Lộc Nguyễn
A simple log-in system
by Andrew Zan
This article is intended for people who are planning to develop sitemap for a site with large amount of pages.
by Monotosh Roy Mon
Developing web service using PHP within 10 minutes
by Zamshed Farhan
Helpful to develop photo gallery
by Vyacheslav Voronenko
Provides brief advise on software customization possibility without need to create own modified AMI
by Gabriel Larco
Debug PHP applications under IIS Express
by Armand Molinski
How to debug PHP on Windows
by ro-php-code
The second part of a set of explained design patterns
by ro-php-code
The first part of a set of explained design patterns
by camaki
Next code demonstrates how to build a simple menu function with the current page high-lighted.index.phpPage - .inactive,...
by caguras
The pagination is a tool which help you to split large result sets over multiple pages.The only thing that you must to do is to follow the next pattern:paginationGetLimit();mysql query(variable $limit...
by fly904
More validation can be applied when handling default values. I am not a fan of outputing anything directly from a class, I prefer to return the links as an array. It's easier to maintain. This way, when/if you change the styling; then it saves having to trawl through your classes.<?phpclass...
by Naga Vinodh Peddi
How to dynamically create file upload control and add text file data to SQL database
by SymfonyDriven
Editing tree structures is a common problem in web development
by VipinMittal18
How to enable debugging in Twig templates - Drupal 8
by NewPast
English Simple Past & Past Participle PHP Auto Generation and Syllable Count in English Word
by Shine Jayakumar
A tip on how to find the geographical location of an IP address.
by about-dev.com
Forms in Symfony 2+ without Doctrine
by AjithKp560_
How to create a FTP manager application to connect your server to FTP server
by Premraj M
What is jQuery?jQuery is a Art, technology, development, coding and hobby.jQuery is a part of WEB 2.O. This is a modern and new technology which is implemented in the browser level. In this tech. all things are handling in div component, JavaScript and CSS.This is a one kind of open...
by Jaiswar Vipin Kumar R.
How to access WAMP Server in LAN or WAN.
by aphpadmin
Create custom directory structure for migration files in your Laravel projects
by Danny Chu
Learn how to detect if client has JavaScript enabled or disabled at your backend webserver
by James Johnes
Do you want to secure your nginx server? Do you want to prevent Google Chrome from name shaming your non-SSL domain? Well, here a perfect yet easy to follow guide to help you.
by Ricardo R Carneiro
In this tip, I describe how to post/send data of a table (or list) of HTML for a LIST/ARRAY in C#.
by Micah Ebohon
Consume SMS API from SMS provider in PHP app
by Mohd Shibli
In this tutorial, we will learn how to solve the PHP header() function problem.
by Veronica S. Zotali
The tip aims to demonstrate the usage of Ajax.BeginForm
by M@dHatter
PHP Magic String Builder with Append Format.
by Fatih P.
Here is the one i wrote sometime ago/* ---------------------------------------------------------------------------- * Teknober.com - All rights reserved * ---------------------------------------------------------------------------- * File Name : TStringBuilder.php * Section ...
by Lộc Nguyễn
An example of log-in system with Facebook API v.4
by rohit7209
It is a very simple and effective utility build in jQuery & PHP to implement pagination on HTML table.
by Santiago Santos Cortizo
jTable adaptation to be used either with jQuery UI and Bootstrap dialogs
by Jesus Carroll
Some typical tips about the security in the use of a mobile device
by AzdevXXI
Introduction Login Google using PHP
by Brahmaputra Mehta
Fastest and most primitive way to get started
by caprico.caprico
This PHP function return the urn (Uniform Resource Name) formed from the content hash of a particular torrent file. The urn refering to the Base32 encoded hash of the file.function base32_encode ($hash){$outString = '';$compBits = '';$BASE32_TABLE = array( ...
by G4mm4R4y
This code guides you in making your own currency, and is very simple.
by Zamshed Farhan
MathGuard is a security option for beginners, developed by PHP and jQuery
by Mostafa Asaduzzaman
Controller Scaffolding in Visual Studio 2015 RC MVC 6 Project
by C Is Sharp
An overview of implementing MVC in PHP.
by James Dale
My Windows Sever 2003 reaches its end of life in 2015. I do not look forward to moving to Server 2012. Surely there has to be a better, portable, and cross platform solution that features zero install and fits on a USB stick.
by Mekki Ahmedi
I am just applying the principle of Defence in Depth
by gxtiou
One Line of code to download youtube's flv file in php
by Robin Boswell
I wanted to convert a very simple site from ASP to PHP. The original ASP version had a Site.master. For the PHP version, I just wanted to have a simple pattern that mimicked this.
by Zamshed Farhan
APC is a very popular PHP extension to optimize PHP developments.
by Chris_Yu
Why and When to Use the Adapter Pattern in PHP Development
by Santiago Santos Cortizo
This pattern will allow you to forget 504 server error on huge operations.
by C Is Sharp
PHP and Accessing MS SQL Server in Unix/Linux.
by vergil135
Code to detect browser name in PHP.
by Dr.Walt Fair, PE
There are several reasons why you may not want to rely on PHP to detect the browser. Some of them are summarized here[^]. In my opinion, it depends on your purpose and your target.
by M@dHatter
A new way to handle globals in php without declaring global identifier.
by Emerald kwekowe
PHP multiple file uploader
by Agon Avdimetaj
A simple file uploader written in PHP.
by Zamshed Farhan
It’s a very common problem for those, using Oracle 11g in Windows 7 (64-bit) with PHP applications.
by Mirzakhmet Syzdykov
Development process in few steps with the help of scripting software
by Peter Leow
The OO way to writing your database operation code in PHP
by Mekki Ahmedi
Still asking your users not to press the Browser’s Refresh Button?
by Member 4206974
A function for works on event
by Michael Safyan
If you've done a regular search for API reference documentation, most likely you've come across links to very old versions of the API (e.g. links to Java 1.4.2 instead of Java 5 or Java 6), or you've probably come across plenty of links that are completely unrelated to the actual search (getting...
by CodingLover
Tweets are one of the mostly used for status sharing these days. This tip highlights one of the easiest ways to display Tweets in PHP.
by Manujith Pallewatte
Showing PHP echo/print output in realtime in all browsers using flush() and ob_flush()
by mridul samadder
Redirecting to a page after login in PHP
by Piotr Gałecki
A simple trick that can relieve the database during a brute-force attack.
by amitjha1611
This article is basically helpfull in handling Registry Key through PHP code.
by Visveswaraiah
Fetching articles from SOLR for RSS feed instead of querying in database
by Ahmet AYDIN
This post describes step by step how to run a Single Page Application template using ASP.NET Web API 2 and angularJS and how to use Web Application Project whose name is Dalyan.
by Latika surse
How to use SASS in Drupal ?
by Alexander Kouznetsov
A way to view, store and process logical expressions
by Mohammad Ali_7
Send and Recive Parameter with Android To Mysql PHP
by AjithKp560_
FTP Client for Web server.
by simsam77
How to set up a SmartOS machine with Node.js and an AMP stack.
by Oliver Bleckmann
Simple but efficient way of logging errors over the internet using a PHP webservice/ REST and mail notification. Logging C#/ .NET errors over the web and with PHP and sending notification mail.
by Pascal Ganaye
A set of functions to get slightly shorter unique Guids
by Emerald kwekowe
Simple PHP code to display a calendar.
by Tareq_Gamal
Simple compact reusable native JavaScript function, you can use it easily in your web Pages to run Ajax Enabled and avoid refresh
by Garbel Nervadof
Convert HTML table data from a website into PHP array
by Ankur.Saxena17
Simple Client-Server socket program in PHP
by Member 4206974
A tip to get a data list on 2 (or more) columns.
by MaulikDusara
some credit card numbers for testing purposes.
by Anshul R
Prefix, Length, and Check Digit CriteriaHere is a table outlining the major credit cards that you might want to validate.CARD TYPE Prefix Length Check digit algorithmMASTERCARD 51-55 16 mod 10VISA 4 13, 16 mod 10AMEX 3437 15 mod 10Diners Club/Carte...
by Ray Radin
In PHP, there is the standard, documented code for returning HTTP response code. This is the undocumented, shorter alternative.
by doug433
This tip shows how PHP can be used to access a MySQL database to retrieve data for a scroll list. Here, I will discuss one that lists 12 rows at a time on a web page.
by Nitesh Kejriwal
A handy method to truncate words to a certain number of characters without breaking any word in between
by Dhanushka Madushan lk
Upload a file using c# as client to a PHP server
by Tareq_Gamal
This article describes how to send and receive data from RaspberryPi and use it as Server.
by vnmatt
Using Responsive File Manager in ASP.NET MVC
by Abet Giron 2022
A simple working solution for real-time (almost) update using server-sent events
by Right Handed Monkey
What are static bindings in PHP. When to use self:: versus static:: to access static methods and fields.
by Afzaal Ahmad Zeeshan
A slight comparison of ASP.NET upon other (web) programming languages in the market and a discussion of me and some other (web) programming language developers.
by Brady Kelly
How I got WordPress running on Heroku
by TrueCodePoet
Fixing mod_rewrite access to .htaccess files for Wordpress "Pretty Permalinks" and 404 errors.
by RezaFarhadian
Write a router for PHP MVC Applications with $_SERVER['PHP_SELF']
by Prabakaran T
Youtube API for PHP to feed a video list from a particular channel without Oauth, this API only needs a Channel ID and Channel name, no need to generate API key access and so on, simply it's fair enough.
by Magyar András
Load videos automatically from selected Youtube channel with PHP and Youtube Data API v3