Algorithms Arrays Passwords Uncategorized
Commerce Uncategorized
Databases Abstraction Layers Informix LDAP MS SQL MySQL ODBC PostgreSQL Uncategorized
Date & Time Calculators Conversion Translation Uncategorized
Discussion Chat Forums Guestbooks Polls Uncategorized
Email Validation Uncategorized
External Uncategorized
Files and Directories Uncategorized
Games Uncategorized
Graphics 3-D Graphs Resizing Thumbnails Uncategorized
HTML Forms Menus & Navigation Source Viewers Tables Templates Uncategorized
HTTP Authentication Cookies File Uploading Uncategorized
I18N Uncategorized
Math Uncategorized
Miscellaneous Uncategorized
Searching and Trees Uncategorized
Security Uncategorized
Text Uncategorized
Utilities Calendars Counters Link Checkers Weather Uncategorized
XML Uncategorized
| php sample source codes |
|---|
|
with this script you can put 7th latest php mailing list from zend.com, <br>
|
|
Posts an array of data to a given URL using rfc2616 - Hypertext Transfer Protocol -- HTTP/1.1
|
|
This 'program' fakes the information you send to uptimes, so you can make your windows 2000 pc, online for 6 years, and you linux 3.3.12 online for 6 years :-)
|
|
The function GetBooks() receives a search term, looks up the best matches on the Amazon.com search engine, checks, if a cover image is available and returns an array of where href, img src and title of the books are stored in. Additionally, you can specify a temp folder where the results shall be cached.
|
|
another version of <a href="http://www.zend.com/codex.php?id=225&single=1">php-general archive grabber</a><br>
( this one use <a href="http://marc.theaimsgroup.com">marc.theaimsgroup.com</a> )
|
|
Want to prevent people from linking to certain pages on your site? This tiny script will alow you to admit users to specified pages from other pages on your site, while preventing people from viewing your pages via outside links. Very reliable script, and extremely easy to set up...
|
|
Parses an apache web server log file and displays each entry to the browser in html tables.
Allows for filtering of output based on the 'status' field of the logfile entry (ie 404, 200, 304 etc).
Still basic and obviously not recommended for users with low bandwidth and large logfiles(!).
I did this because I couldn't find any existing scripts - plus I learnt a bit about log files in process.
More than likely you will have to change the way the script extracts the logfile fields from each line, but at least the script gives you an idea how you could do it...
I have a simpler version of the script which doesn't do filtering (just outputs two tables - 'success' and 'failure'(though failure includes 304 as well as 404 page requests)). This is perhaps easier to read - email me if you want it.
|
|
This program werk for checking someone online on Mailinglist on egroups<br>
this sample checking it-center mailing list and find someone called Made <br>Wiryana if we found him so print that he online vice versa<br>
hoply this program usefull for you<br>
|
|
Currency Conversion U.S. Dollar
|
|
This code snippet shows how to send a PHP powered HDML page to a wireless device such as a cell phone, PDA, etc.
|
|
I had allways wondered how sites using PHP could count online users and do lots of fancy stuff with sessions. I decided to experiment and I created a set of session functions to replace the default php session functions. I use session_set_save_handler() to tell php to use my functions for sessions.
This worked well but I then decided to make the set of functions into a class for use on any project, quickly and easily.
The class uses MySQL but with some modifications can be used with other databases.
To use all you have to do is include the class file in your script and change the mysql connection variables.
|
|
How to display PHP powered WML pages for wireless use in cell phones, PDAs, etc.
|
|
A way to use full key=value type queries without using '?'. Useful for making a page for search engine friendliness.
|
|
see code comments
|
|
If you want to have a Header and Footer on every page, including default apache directoryindexes, then you can use this script to generate a directory index instead of letting Apache do it. Combined with php's auto_prepend_file and auto_append_file, you will get your headers and footers on all documents served. Without this you would be trying to use the apache directives for HeaderName and ReadmeName, but they only work if the file to use is inside the directory that apache is giving a listing of (you can't spacify a URL or absolute path for those 2 directives in a top level .htaccess file). This is good if you have a giant site with a ton of subdirectories and you dont feel like going around creating ReadmeName and HeaderName files for Apache to use. The down side if that all docs must be parsed as php for auto_append and auto_prepend to work. The upside is that PHP is great.
This code was modified from source provided by http://www.webaugur.com/wares/autoindex written by dave at webaugur. com
|
|
Due to some bugs on MSIE browsers, when trying to force the browser to download a file specifiying the name of the file (via Header), it fails.
This code is the solution.
|
|
This simple code work for collection domain(co.*) from google.com
|
|
Grabbing English-Indonesian Dictionary from www.kamus.web.id put it in your page. Only display the result from the keyword you search.
|
|
Grabbing some html put it in your page, i hope this is use full for you, <br>you can grab any information from net and put it on your page as your <br>information :)
btw be sure to ask permission from the site before you grabbing their <br>info :) they gonna bombed ( hits i mean ) like your page hited!
|
|
Grabbing some html put it in your page, i hope this is use full for you,
<br>you can grab any information from net and put it on your page as your
<br>information :) btw be sure to ask permission from the site before you grabbing their
<br>info :) they gonna bombed ( hits i mean ) like your page hited!
<br><br><b>note:</b><br>
<br>on this version will cover the error if <b>the target site down!</b>
|
|
I had one web site with over 30 different domain names pointed to it and I needed to write a little fragment that would return a variable giving me the Fully qualified domain name someone came to my site with to determine some basic page elements and a database query. This is not perfect (see note below), but it did do the job for me.
The problem was that people could reach the site using different variations of the differing domain names such as http://domain.com and http://www.domain.com . I looked around and found a little used PHP constant and expanded it a bit and came up with the following.
I also noticed there were others out there trying to accomplish the same thing using the HTTP_REFERER constant, however, that only works if the person coming to your site was referred there, this will cover those who type in your domain name as well as those that are referred.
With the returned variable from this function you can customize your site however you like with an accompaning statement to define your values.
NOTE: This only works if the host name in question is either http://domain.com or http://www.domain.com
I would like to expand this function to allow for sub domain's such as http://subdomain.domain.com . As it stands it will only strip out "www" if it exists. If there is someone out there who could write a fancy regular expression which would accomplish the task so the function returned only the Fully Qualified Domain Name I would be forever greatful!
CHANGES:
1.0 to 1.1
global $HTTP_HOST variable is now pulled from within the function.
|
|
Dynamic server pages normally don't send information to allow cache expiration control and if-modified-since requests. Therefore, web caches and browsers have problems with those dynamic contents (they either refresh always or show expired pages).
I provide a easy to use function that must be called with the last modification date of the data base/dynamic content.
It complies with HTTP/1.1 (RFC2616) and HTTP/1.0 strong and weak validators. It also takes in account, and differentiates that the same page might be accesed anonymously or user authenticated.
The original version was implemented in bulma.lug.net, which uses PHP4 and Postgres7.
|
|
Determines if user was referred by your site.
Easy to configure. Very useful security script to make sure that the referred host is allowed to access the script.
|
|
A simple class to send ICQ Pager.
|
|
The function get_status($uin) checks the icq status of of the uin "$uin". The possible "returns" are <b>online</b>, <b>offline</b>, <b>disabled</b>, and <b>unknown</b>. <BR><BR>Please report any bugs, comments, or ideas on how to improve this script to <a href="mailto:billzeller@yahoo.com">me</a>.<BR><BR>A similiar script is available <a href="http://www.evilwalrus.com/viewcode.php3?lang=&id=8">here</a>.
|
|
The easiest to install effective bandwidth protector on the market. Set it up easily in less than 5 minutes and your on the way to big bandwidth savings!
|
|
Lumber Jack log's all visitors screen a web surfing statistics to a mysql database then display's them with the gd library in either a line graph or a pie chart.
|
|
Modify GET variables in a URL.
|
|
my.mp3.com playlist shuffler. this class is designed to be used in a script which itself is designed to be used in a link on your my.mp3.com radio station, allowing real-time shuffling of your current playlist to be downloaded into the visitor's mp3 player.<BR>
I'm using fopen to download the html, eregi and preg_split to parse for the stuff I want, and curl to get it.
Working on adding a logfile.txt so you can see who's been using your link
|
|
This is HTML file with JavaScript to ensure Cookie and JavaScript is enabled. This file also can use for fall back to URL mode session.
Many sites currently on the net will not work properly without Cookie and JavaScript. If your site does not work without JavaScript or Cookie, this may be useful.
|
|
This is an example user defined session handlers for PostgreSQL.
It includes some functions to access session data as an example
|
|
I hope this is in the right catagory...heh.<p>
A class for retrieval of <a href="http://dmoz.org">ODP</a> catagory data. This class sets a small number of variables to allow you to output the data retreived anyway you want.<p>
It's still a work in progress, so all the help I could get from people interested in updating it or something would be very helpful.<p>
In this newer version (1.0UF2), i made it possible to output RSS for each catagory pulled from the ODP.
|
|
Use this code to make a Post method act like a Get method.
|
|
Let your PHP script pretend to be an HTML form! This function takes an associative array and a URL. The array is URL-encoded and then POSTed to the URL in HTTP 1.1 format.
|
|
Print all variables that arrived by POST, including arrays
|
|
for designer who use many htmls for his/her site to spesific browser, this is just a sample you can customise by your self.
|
|
a small function that can validate arguments passed by GET/POST. can be use on any arguments validation case.
|
|
if u use any (text) variable for your ID you will have problem with browser compatibility,<br>
how to get rid off from space? u can use this.
|
|
This will allow your users to be redirected according to wub-doamin prefix.
|
|
Gets an URL and converts it to standard format (eg. ftp.somewhere.org - ftp://ftp.somewhere.org/). It can distinguish ftp scheme, when the hostname starts with 'ftp'.
|
|
A simple function that takes an array such as HTTP_GET_VARS and creates an url variable string from the elements.
This string can then be used in a link to another page.
Especially useful for Last Page / Next Page / Modify Search buttons on search pages.
|
|
Resolves from $HTTP_USER_AGENT operating system and browser.
It know:
Operating systems: Win3.1, Win3.11, Win95, Win98, WinME, WinNT, Win2000, WinXP, Win.NET, WinCE, MacOSX, MacPPC, Mac68K, Linux, FreeBSD, NetBSD, Unix, HP-UX, SunOS, IRIX, OSF1, QNX Photon, OS/2, Amiga, Symbian, Palm, Liberate, Sega Dreamcast, WebTV, PowerTV, Prodigy.
Browsers: Amaya, AOL, AWeb, Beonex, Camino, Cyberdog, Dillo, Doris, ELinks, Emacs, Firebird, FrontPage, Galeon, Chimera, iCab, Internet Explorer, Konqueror, Liberate, Links, Lycoris Desktop/LX, Lynx, Netcaptor, Netpliance, Netscape, Mozzila, OffByOne, Opera, Pocket Inetrnet Explorer, PowerBrowser, Phoenix, PlanetWeb, PowerTV, Prodigy, Voyager, QuickTime, Safari, Tango, WebExplorer, WebTV, Yandex.
|