Latest PHP Code Snippets

Popular / Snippets

Prox created a Page  -  Sep 09, 2015
1 98 

Basic website form HTML

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

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
162 

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
3,036 

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 63 

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
628 

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 199 

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
157 

EVER FELT LIKE TALKING IN CAPS IN ONE CHANNEL ALONE!?

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

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

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

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 471 

[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 379 

PITC timer. Requires version 1.0. Based upon http://www.hawkee.com/snippet/9707/

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

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
755 

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
397 

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 314 

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
674 

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
149 

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
1,008 

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
344 

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 http://www.tvrage.com/Mobbed My Cat From Hell @ 08:00 pm ( 2012-07-14 ) [ S03E03 ] Kitty Dearest http://www.tvrage.com/My_Cat_From_Hell NYC 22 @ 08:00 pm ( 2012-07-14 ) [ S01E07 ] Block Party http://www.tvrage.com/The_2-2 ...

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

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
1,104 

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  
funnyboy243 created a Page  -  May 04, 2012
1 353 

This script give your Google Voice a SIP Number (as well as a Skype number), which people can call without calling through real telephones. It also allows you to add phone number aliases (even International numbers) to your GV number so people in other areas can call your GV number as a local call, or at least without International calling fees.

  1 Thread   PHP  
funnyboy243 created a Page  -  May 04, 2012
235 

This script lets you forward to any SIP (or regular) number using a US number that you choose as a forwarding phone. I also added the ability to record outgoing calls, and automatic GV number verification, which can be used for people who don't have any US numbers to verify their new GV accounts. Also you can use this script to forward to numbers with extensions.

 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.