Don't lose your website visitors when they link out of your website!! A short frame with "Back To My Site" and "Remove Frame" will be added to the top of any external URL
link.
This script allows you to send SMS (also long SMS), EMS, RTTTL-Ringtones, Logos (GIF, JPG, PNG) with automatic image resizing, EMS Pictures with copy protection and autosave
feature, Nokia Operator Logos, Nokia Multipart messages and so on. Pictures and Ringtones can be HEX-included or specified to be downloaded from a HTTP-source. You can setup
the 2-way service within minutes on TrueSenses.com. Requires NO additional libraries programs or databases.
Allows guests to rate something 1 to 5 stars, then takes the results and returns a number of stars based on the average rating. If you try the script and get an error
regarding the file 'ratings.php', try downloading the zipped file at http://habitat675.port5.com/rate/ratings.zip and chmod ratings.php 666. File also includes star images
which you are free to use if you like, or you can use your own.
Works by fetching the whois server from whois.crsnic.net if com,net,org,edu address, sets the whois server it to countrycode.whois-servers.net for au,uk,etc. and sets the
whois server to whois.arin.net for ips. Then it queries the aproprite whois server.
use print_array($variable) to dump the contents of a variable of any type including objects or arrays into any easy to read html format.. It supports recursive object and
arrays
Tests bandwidth with a random string. The size of the random string can be altered. Warning: when the script is set up to generate a large amount of data, your server may
crash.
Utility Class with some useful functions to populate and retrieve values of JavaBean-like objects. Inspired be Jakarta Commons BeanUtils (http://jakarta.apache.org)
A function that check best before dates on links to local files. Add new's flash or mark the link red on new files. Send a mail to the creator if the file are old. Check
updates on your webcam and display a messgage if you are out of office.
A function that check best before dates on links to local files. Add new's flash or mark the link red on new files. Send a mail to the creator if the file are old. Check
updates on your webcam and display a messgage if you are out of office.
A News-Frontend for the news-section of the german TV reality show "BigBrother". At this time the script is only in german. if someone from outside of germany is interested in
an english version, please contact me!!
If you need to keep track of a lot of on/off toggles, like user settings etc. There is only one easy way to store and manipulate these values: Bitfields. With these
functions manipulating bitfields becomes easy. Everything you need is included below.
This code takes in a string of keywords and evaluates the string, turning it into three collections of strings based on the boolean operators in the string. Please send
comments on how I can improve the code. I'd love to get some feedback.
Cacher allows you to cache variables (anything that can be put into a variable) for later use. This speeds up loading time, and reduces load on the data source.
classKurs is a PHP class that lets you grab Bank Indonesia's content of kurs, then put the content on a single file. The grabber can be set as cron job. There is also the
function to show the grabbed file in formated html tags, ready to go.
ContentBuilder is a powerfull news- and article-management system for smaller sites. We call it pluggable CMS, because its possible to add own Modules without changing the
running system. The system uses PHP and MySQL for data-processing. It allows you to easily add, delete and modify articles, users and headlines. It features multi-user access
levels and multiple file upload. All settings can easily be configured via a web interface.
This is a down and dirty COPPA age verifier. This function takes 3 args. A birthday, a birthmonth and a birthyear and returns the users actual age if it's good and false if
it's non-compliant. Throw this into a general include file and slap it in your library and you won't have to worry if you're letting any kids in. This is an important issue
since it's illegal to gather user data if the person is under 13 years old.
I snagged the US State array posted here, but I needed countries as well. I snagged it as a CSV list at http://www.din.de/gremien/nas/nabd/iso3166ma/codlstp1/db_en.html and
wrote a little function to print out the list in array format ;-]
Use this code to connect to the dhs servers and update your ip address and other information (useful with another standalone script running from cron to check for a change in
ip over roadrunner or dsl)
A patched version of Jan Fredrik Leversund's dumper. Dumper, like Perl's Data::Dumper, provides a string representation
of a data structure. The string can be eval'ed to recreate the data structure. This version will nicely list object properties instead of just displaying the serialized
bytedumps.
The most interesting feature is probably displaying the highlighted source code that triggered the errors. It also allows logging errors to syslog and dumping context on fatal
errors.
This function allows you to create an alias for a function. For example if you do not like the function name 'substr', create your own alias named 'mid' (perhaps you know this
function name from BASIC). It does not work with function which use references.
Get the value of a string or array If an array is passed, then it is split into two components: the array name and its keys. If you pass array('array','one','two','three'),
then the resulting variable name would be $array['one']['two']['three']. This can be up to an infinite depth. This is especially useful in Objects. It was specifically
designed for that purpose.
This is a simple function that creates a link to a mapquest link. The function accepts the a street, city, state, zip and optionally a string for the link. If the link string
is not set it uses the address for the link string.
This little function will help you debug scripts, specially if you use a lot of objects and arrays. it prints a beautified version of the 'print_r' output.
if you add this function to your script, just call your script adding ?debug=1 (script.php?debug=1)or add the $debug global variable set to true to see the debugging output
this function returns the status of a given icq number (online,offline,disabled). after endless looking for an icq status checker in php and discovering some none-working, i
found out the easy way icq handles the status images and wrote a small function to parse their reply stuff to a status image query.
ImageThumb is a small piece of software written in the PHP language that lets you create thumbnails on the fly for a given image, whether it is local ore remote. Currently
supported formats are GIF, PNG and JPEG. Now supports thumbnail caching. To use this script, you must have the GD library installed, and obiously a webserver capable of
running PHP scripts (PHP >= 4.0.4)
Converts a binary IP to human-readable representation. This is a compatibility implementation of the original inet_ntop function at : http://www.php.net/inet_ntop
Simple tool to help start documentation of object tree. It shows the inheritance diagram for all declared classes, and shows interface for the classes. Can be used dynamicaly
(cached), or it can generate static html documents. In class representation inherited properties and methods are grey. It can be configured to display all declared classes, or
only user defined classes, or user defined classes with necessary built in classes due to it's inheritance.
The inline class provides methods for creating and destroying local variable scopes. Simply put, local scopes are spaces where some or all of the global variables are
temporarily hidden.
This behavior is useful when debugging, or for making emergency hacks to code.
Methods include:
inline() (class constructor) - create a local scope for one or more variables.
get_global() - find the value of a hidden global variable.
get_globals() - find the values of all the hidden global variables.
export() - export a local variable to global scope.
export_all() - export all local variables to global scope.
exit_scope() - exit the local scope and destroy the class variables
This class provides an interface to poppassd, a commonly used daemon to enable password changes via the network, particularly using the Eudora mail client. Take care to ensure
the safety of your password data in transit! I recommend using this script only over SSL.
remember JAPH? Just Another Perl Hacker, ( http://www.cpan.org/misc/japh ) lets start with JAPC, Just Another Php Coder
:)
just cut and paste code this code and use as signature :)
CUSTOM 404 - HTM TO PHP SCRIPT This custom .404 script performs some valuable, practical functions: 1). For Web developers who are transitioning large, static HTML sites to
much more powerful PHP versions it allows you to replace pages gradually and TRANSPARENTLY without sacrificing your internal or external link integrity. All links to your
pages can remain the same (i.e. .htm, .html, etc) even AFTER you replace them with same-name .php versions. What this does is prevent you from losing any position in the
search engines and also keeps all your internal and incoming links from other sites operating and active. 2). You don't have to use the (Apache) Mod_Rewrite module, Force_Type
directives or even have access to your .conf file in order to use it. This is especially useful for those running several virtual domains on the same server and need separate
rules for each. 3). When your new PHP pages are in place, you can still submit them for re-indexing with the search engines and directories using the (more friendly and
common) .htm extensions. 4). By leaving this .404 script in place, you can simply add different header locations or file includes ($page.php) to it later that redirect to,
say, your database scripts or other PHP pages that perform different functions. In this way you can create literally thousands of (what appear to be) normal, static .html
pages which (actually) do not exist, but are php-created on the fly.
This code times the build and download of web pages without the need for PERL or JavaScript and has minimal code in this demo, but can be built into a full tilt tracking
system.
This PHP script shows how to lookup country origin by using visitor's IP address. This example required an external ACCESS database for lookup purpose. Full database is
available at http://www.location.com.my. Developers use this script for projects related to: 1. Display native language and currency 2. Redirect based on country 3. Digital
rights management 4. Prevent password sharing and abuse of service 5. Reduce credit card fraud 6. Web log stats and analysis 7. Auto-selection of country on forms 8. Filter
access from countries you do not do business with 9. Geo-targeting for increased sales and click-thrus 10. And much, much more!
This is the PHP interface module for Voicent Gateway, a VoiceXML gateway for your PC. You can use this interface module to make telephone calls from your perl program,
provided that the Voicent Gateway is installed and can be accessed through HTTP. There is a FREE version of Voicent Gateway program downloadable from:
http://www.voicent.com/download
Searches through directories of text based files for a string. Configurable parameters are: extensions to search through, and directories to search through. I use it to search
through my code library.
Meunity is a Web-based community system that uses PHP. It is object oriented, so it is easily extendible. Its database abstraction layer allows it to be compatible with
multiple databases. It is easily configurable, and includes content management systems and advanced administration.
retrieve mp3 files info (bitrate, duration, layer, etc) and id3v1 tags (artist,title, etc.), send file playlist, stream file with icecast headers url a few methods are broken,
and need to be completed (I have no time for this). File info and properties reading works ok. url is http://www.sumatrasolutions.com/
PHP class for use with OPML (Outline Processor Markup Language) files. OPML is a XML-based file format for outline-structured information. More info at http://www.opml.org
Phoogle is the winner of the first ever PHP Coding Contest at http://codewalkers.com - it was coded by Jon Bardin. Phoogle does some manipulation of google and google groups
search results. It is a wonderful example of using sockets.
4 code fragments to - set data in PHP and start matlab script - run matlab script - read data from matlab script and redirect to php page - display result in php
This project includes some classes which are used to generate very simple MS Excel file (xls) via PHP. The generated xls file can be obtained by web as a stream file or can be
written under $default_dir path. It has very simple usage to generate xls file from a select query using mysql, pgsql, oci8 databases. Limitation: - Max character size of a
text(label) cell is 255 ( due to MS Excel 5.0 Binary File Format definition ) Please get the full pack at http://sourceforge.net/projects/psxlsgen/
If you want to use PHP to populate fields in a PDF form (for instance, extracting data from a database and prefilling fields for the user) and you don't have the FDF module
available to you for whatever reason, this function should work. Regardless, I think this function is more straightforward to use than the FDF module functions.
I use this to make my windows 2000 Internet explorer bookmarks available from a webpage. This code is very basic and will require modification to be of use elsewhere (I make
specific references to my filesystem layout). The linux box mounts two w2k drives as /mnt/gleghorn/khome and /mnt/gleghorn/favs, a miscellaneous area and my MSIE bookmarks
respectively. The code refers to preform.phps. This is just a symbolic link to preform.php I specify preform.php as the last in the apache DirectoryIndex list, followed by
index.html, default.html etc. When browsing either of the two mounted drives, if invoked by the absence of anything else indexy, it scans the directories and pretty-prints
what it finds. Any MSIE-style *.url files are written out human-readable and clickable. hash include standard disclaimer
For all you students out there with over-restricted internet access this will get around it! Just open this page from school and enter the desired url. The internet blocking
software thinks its viewning a harmless page and not the blocked one! There is a MySQL based login built in that can be uncommented and used if you have access to a MySQL
database as well.
A little function I created to read the dimensions (width, height) of an Adobe Photoshop image, or PSD. PSDs exported by third-party programs normally don't have the required
embedded tags to be read. If the file is unparsable, the function returns null. If it can, however, it returns an array with the width at index 0 and the height at index 1.
This simple ad banner rotator can actually be used to randomly serve any file (via an include) on a php page, not just an ad banner. Ad tags which contain multiple links, or
images will not break the page which display it. get it at http://markdonline.com/code/code.php3
Use this script to automatically add a random background music to your site. Requires the use of an extra frame, to make sure the music continues, even if a visitor
navigates to another part of your site.
This script ain't perfect yet! I've never learned PHP, but I managed to wrote this one so any suggestion is greatly appreciated!
Some words in the script are in Dutch. If this gives any trouble, just mail me at mark@mjansen.doge.nl and I'll translate them for you.
This is a redirect function that takes care of most redirect functions (session, vars, ect). Uses the header function so you must call this function before any html output.
THere are 4 types of redirect built into this function.
First is a simple redirect called like this redirect("page.php");
Second redirects and adds session info and is i called like this redirect("page.php", 1) the '1' tells the function to add the session info.
third is redirecting while adding variables to the url. called like this redirect("page.php",2,$my array) $my_array contains the variables and values to pass. example
$my_array[0] = "var1=12";
$my_array[1] = "var2=15";
$my_array[2] = "var3=78";
redirect will result in /page.php?var1=12&var2=15$var3=78
THe last redirect is a redirect passing both URL variables as well as session information. redirect("page.php",3,$my_array);
With more and more people using FrontControllers (pagination scripts) to have one entry point to applications or homepages - I found a need for a function that took a request
url (or any url) and replace certain values of arguments or even to remove some arguments. This function does exactly that. It takes an input string and then replaces or
removes arguments.
rWhois (see rwhois.net) in PHP. You can use this function to get geographic data back on on an IP, City/State/Zip this might come in handy if you are attempting to geo-target
an IP by country, say, for an ad program.
Want your customer to save your article, product catalog, or just a document to PDF format? PDF is very easy document format because it's portable, they can print it anywhere.
Shared memory examples, there are few examples to be found just about anywhere on this subject, I wrote these up a few months ago and am posting them here in case anyone might
need these.
Slots and Signals ================= This code is a simple implementation of the slots/signals concept. Slots and signals are used by the Qt toolkit as a kind of extra-powerful
callback. The best source of information on them is the Qt toolkit docs see (http://doc.trolltech.com/3.0/signalsandslots.html) To briefly summarize, they allow you to bind a
signal to one or more slots and/or signals. When a signal is 'emitted', all slots and signals bound to it are called. Each slot corresponds to a single function. When a signal
is called by another signal, the called signal is emitted, calling the slots and signals that it is bound to. Any parameters passed when the signal is emitted are passed to
the slots and signals that that are called. This easily allows you to write handler functions (slots) and bind them to events (signals) as needed - without having to make
explicit function calls or rewrite handler functions just to accomodate minor modifications in how a function is called. I find slots and signals particular useful for message
passing and error handling. Have Fun! :) Zak Greant
Simple script to upload files via FTP. You can define destination directories by scroll-down menu, maximum file size and allowed file extensions. Originally written to allow
clerks uploading zip files into certain restriced areas of my website.
Allows creation of singleton classes by inheriting this superclass. The interface is the same as the GOF pattern. Handles constructor parameters, but as values only, but this
can be easily worked arounded by overriding the instance() method.
Create a singleton by inheriting from this superclass. This is the classic GOF pattern and copies this interface. Handles constructor parameters as values, but this can be
worked around by including this class as a guard and overriding the instance() class method.
This app lets endusers search your site for keywords. You specify which directories should be included in the search. Version 1.1 Fixed a bug where if two words were only
seperated by HTML Tags they were placed into only one string.
This app lets endusers search your site for keywords. You specify which directories should be included in the search. Version 1.2 Added: Reading of HTML Title tags for
generating search results. Checking to see if SiteSearch has been included or required by another script to avoid HTML errors. Filter for files not to include in searches.
This is the method I use to work with flags and their string counter-parts when working on non-OO projects. It's nice because it keeps these flag strings out of global scope,
while only using one static copy of the array through the entire lifespan of the script.
Save a variable to shared memory. In other words you are caching variables to shared memory and instantly making them available to all your php pages via shared memory.
PHP class to parse and extract data held in the header section from SWF flash files, like width, height, version, etc. Supports both, compressed and non-compressed SWF files.
The Syslog class is a syslog device implementation in PHP following the RFC 3164 rules.
Using this class, it is possible to send a syslog message to an external relay or collector using the UDP port 514.
Sockets support must be enabled.
In Linux and *nix environments, the extension is enabled at compile time using the --enable-sockets configure option.
In Windows, PHP Sockets can be activated by un-commenting extension=php_sockets.dll in php.ini.
At times it is useful to output colored terminal output when running command line PHP scripts. (i.e. Install scripts, general run scripts etc..).. Well, here is one way to do
it that is pretty simple.
Many of you may have something like this already, but I would rather be able to find this here than root around my drive in a month. :) You may need to add Puerto Rico,
Micronesia, etc for your needs, but the basic 50 plus DC were enough for me most of the time.
whois lookup function for most domains you could wish to use. Easily added to for support for more domain registries. Similar to the one in the top 10 but doesn't use a
middleman to retrieve the data.
Write is a simple editor for the web. It has a File list box on the left side and the editor textfield in the right side. The next step is to build a class module which
generates automatically this editor.
If your site uses a third-party adserver that pays you for unique impressions, your site may be displaying ads that you are not getting paid for. Xenolth's Unique Ad Rotator
is a PHP script that will rotate your banner/pop-up ads to make sure that you get the maximum profit from your ads, and it will also make sure that your website only displays
ads when you're getting paid for them.
This is a class for calculating the distance between two zip codes and/or obtaining a list of zip codes within a range of a given zip code along with the mileage from that zip
code. This class uses lattitude and longitude coordinates taken from a MySQL table to calculate the distances. The class along with a demo and the SQL files required to create
the database can be downloaded from http://www.micahcarrick.com/files/zipcode-1.0.0.zip