Latest PHP Code Snippets

Popular / Snippets

DavidMonk created a Page  -  Apr 20, 2021

The task is to display a drop-down list of all tags and add a link obtained using get_tag_link () to each displayed tag;

 Respond   PHP  
troybarone created a Page  -  Nov 25, 2020

Elementor Page Builder is a drag and drop page builder that enables webmasters to create high-end websites at record speeds that are perfect down to every last pixel. With over 4+ million active installs, the Elementor Page Builder plugin is one of the most popular page builders available in the plugin repository.

 Respond   PHP  
Prox created a Page  -  Sep 09, 2015
1 124 

Basic website form HTML

 Respond   PHP  
Hawkee created a Page  -  Oct 31, 2014
1 306 

We now support CodePen embeds! While our page editor strips out most HTML tags, including <script> tags, we've made a special provision to support tags specifically from CodePen. All you need to do is paste the embed code directly from CodePen into the page editor.

 Respond   PHP  
pimteam created a Page  -  May 14, 2014

Sometimes you need to do preg_replace on user input. Don't forget to escape all special characters or you'll get funny results. Here is how:

 Respond   PHP  
Typo created a Page  -  Mar 06, 2014

Generate random strings (tokens) of variable lengths with selectable characters and output in text, binary, octal, decimal or hexadecimal.

  2 Threads   PHP  
Sorasyn created a Page  -  Dec 07, 2013

As the title states, this is just a small class I've written to represent a Matrix object as seen every so often in various disciplines of mathematics. Matrices are, in programming terms, basically a two dimensional array of integers that can represent anything from trigonometric angles, and vectors; to any number of notable applications including tracking network paths, and applying cryptography calculations,..

  1 Thread   PHP  
annehawkins created a Page  -  Aug 24, 2013

If you have a form which ob being filled, you would like the user to be redirected to another page. In these cases if you try to post to $_SERVER['PHP_SELF'], this will not work.

  3 Threads   PHP  
sarvsav created a Page  -  Aug 04, 2013

Here is the PHP code, thats using the curl function to find the IMDB rating of any movie.

  1 Thread   PHP  
MoshMage created a Page  -  Jun 19, 2013
1 65 

Returns true if the inputed string is alphanumeric (either letters or numbers) after ignoring chosen chars. The snippet makes use of str_replace and the original ctype_alnum.

  1 Thread   PHP  
codedexter11 created a Page  -  Jun 15, 2013

It allows you to show you helpful message to site visitors during the down time of your website.

  1 Thread   PHP  
TMFKSOFT created a Page  -  May 22, 2013
1 205 

I've recently been working on a new project that called for a fancy looking time and date system. To solve this issue I've wrote one.

  4 Threads   PHP  
TMFKSOFT created a Page  -  Apr 20, 2013


 Respond   PHP  
TMFKSOFT created a Page  -  Jan 05, 2013
1 272 

PITC Has teamed with to produce a simple Screenshot uploading service for PITC!

 Respond   PHP  
TMFKSOFT created a Page  -  Nov 18, 2012
2 172 

This simple screenshot script utilises both a development addition to PITC and the PHP GD Image Extension.

  1 Thread   PHP  
ProIcons created a Page  -  Nov 18, 2012
1 492 

[size=20]mIRC Identifier Library - Still Beta.[/size] This library contains the most of usable [out of mIRC and IRC Connection] identifiers. All the Identifiers has the same Syntax with mIRC's Syntax.

[nas]peter created a Page  -  Nov 13, 2012
2 385 

PITC timer. Requires version 1.0. Based upon

  2 Threads   PHP  
TMFKSOFT created a Page  -  Nov 12, 2012
2 553 

This script is similar to the IRC Bot in the Anope Support channel except this script returns the actual Module URL unlike the Anope Modbot.

  1 Thread   PHP  
[nas]peter created a Page  -  Nov 05, 2012

This is a timer to be build into a bot. Example usage: timer_add('function',1,30,"showfunction();"); This creates the timer named 'function' which executes 'showfunction' function after 30 seconds and then deletes the timer.

  9 Threads   PHP  
Hawkee created a Page  -  Nov 04, 2012

This will run nl2br on everything inside a string except for what is between the opening and closing tags. For example you can add 's to a comment that contains [ code ] tags without touching the code itself:

  4 Threads   PHP  
TMFKSOFT created a Page  -  Sep 25, 2012
1 323 

This is a simple script for PITC v1.0 that adds /slap to PITC when loaded.

 Respond   PHP  
Giygas created a Page  -  Sep 25, 2012

This code is a basic simplistic script designed for 1.0+ versions of the new and unique PITC IRC Client written in pure PHP. It has a fantastic API. Try it out yourselves. Has some humor in it. Don't take my try on the actual product =p. Love PHP.

  1 Thread   PHP  
TMFKSOFT created a Page  -  Sep 17, 2012

This script adds /log to PITC when loaded. With it you can save the scrollback of any open window to file It will be named #channel.log in the 'logs' directory.

  5 Threads   PHP  
pimteam created a Page  -  Aug 16, 2012

I have struggled with creating calendars in PHP and HTML several times so far. There are different approaches, but I believe the class below is one of the best possible in terms of code readability.

  3 Threads   PHP  
Hawkee created a Page  -  Jul 27, 2012

This is a command line script that interfaces with Minecraft via rcon. It gives all the players on your server a chance to win a random item by typing "join". Here are the different modes:

  8 Threads   PHP  
zenx created a Page  -  Jul 13, 2012

Grabs & formats a new version of tvrage's myrss.php file daily, from here it'd be easy to insert items to mysql ... Mobbed @ 08:00 pm ( 2012-07-14 ) [ S01E07 ] You're Fired My Cat From Hell @ 08:00 pm ( 2012-07-14 ) [ S03E03 ] Kitty Dearest NYC 22 @ 08:00 pm ( 2012-07-14 ) [ S01E07 ] Block Party ...

  1 Thread   PHP  
Maximus1983 created a Page  -  Jun 27, 2012

Capture Web Screenshots easily with the GrabzIt PHP API. You will need the free GrabzIt PHP Code Library to get started.

  1 Thread   PHP  
zenx created a Page  -  Jun 23, 2012

Useful for example in PHP bots

  4 Threads   PHP  
Hawkee created a Page  -  May 15, 2012

This is an easy to maintain method for creating clean urls without any file extensions. It's very good for hiding your underlying programming language and offers a more user friendly experience. It only uses a single series of mod_rewrite rules then all the rest of the logic can be accomplished within your script. You'll need mod_rewrite enabled and you can put these rules into your .htaccess or..

  3 Threads   PHP  
Hawkee created a Page  -  May 12, 2012

Ever wonder how many posts were made over the past few days or months? This is a very simple data visualization tool that shows you exactly how many.

 Respond   PHP  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.