sean

sean

Joined
Jan 03, 2006
Occupation
Web Developer for Walt Disney
Location
Orlando, FL
Website
About me
Code #Rustlang #Nodejs | Comics | Fhqwhgads | #ENTP | Opinions are my own
Interests
PHP, CSS, Javascript (jQuery, node.js, Angular), Java

PHP Code Snippets

sean created a Page  -  May 27, 2011
914 

string array_peek( array $a, string $k ) This function returns a string of the next key in sequential order of $a, delimited by $k. Useful when iterating through an array. and needing to "peek ahead" of a key.

  3 Threads   PHP  
sean created a Page  -  Dec 10, 2010
1,178 

This is a simple MySQLi extender example. You instantiate this class just as you would MySQLi.

 Respond   PHP  
sean created a Page  -  Dec 07, 2010

This is a simple pagination snippet I wrote for a Drupal module I was working on. I've unDruaplized it and now it's completely independent.

  4 Threads   PHP  
sean created a Page  -  May 23, 2010
100 

this is the one way routine Command and Conquer: Tiberian Sun uses to encrypt user passwords. pretty weak algorithm and extremely old game but, thought it would be fun to share. needed this to have the ability to match credentials for a server i'm developing. :)

 Respond   PHP  
sean created a Page  -  Mar 13, 2010
609 

a simple template class to separate design from code (mvc). similar to the ever popular smarty framework, just not nearly as big lol

  5 Threads   PHP  
sean created a Page  -  Mar 04, 2010
2 667 

simple mysql class.usage: change predefined vars under 'mysql server configuration' to suit your environment.

  8 Threads   PHP  
sean created a Page  -  Sep 16, 2008
1,308 

this will retrieve your halo 3 weapon kills and medals from social rankings. the image id and how many kills/medals gets spit out via array ( example of how to use image id within snippet ). made this for a facebook app that im creating and decided to share. this snippet is not mysql reliant, it stores everything within the specified cache file ('xbl_h3_cache.txt').

  8 Threads   PHP  
sean created a Page  -  Sep 08, 2008

simple encryption example. output is the sum of 2 and the ascii value of each character. for example, below is listed a string of characters and their ascii value.s = 115, e = 101, a = 97, n = 110

  9 Threads   PHP  
sean created a Page  -  Sep 17, 2006
259 

Simply put the code in your sites functions.php and call it in page_head.php! check_referer() check_referer("./difname")

  1 Thread   PHP  
sean created a Page  -  Sep 17, 2006
192 

Output: Array [0] => l.o.n.g.s.u.b.d.o.m.a.i.n [1] => ddomainn [2] => net

 Respond   PHP  
sean created a Page  -  Sep 14, 2006
568 

Just fixed up a old xml function I had laying around. This will return an associative array. I dug it up for a news bot Im coding, it reads google rss feeds.

  3 Threads   PHP  
sean created a Page  -  Sep 14, 2006

output: 36 years 8 months 3 weeks 2 days 24 minutes 32 seconds 36 years 8 months 3 weeks 2 days 36 years 8 months

  8 Threads   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.