Zend - The PHP Company




HTTP

Add Code


7th latest php mailing list  

Type: code fragment
Added by: idban
Entered: 17/07/2000
Last modified: 07/12/2001
Rating: **** (7 votes)
Views: 11545
with this script you can put 7th latest php mailing list from zend.com,


A HTTP POST  

Type: application
Added by: daniel1
Entered: 07/11/2001
Last modified: 01/11/2000
Rating: **** (5 votes)
Views: 10581
Posts an array of data to a given URL using rfc2616 - Hypertext Transfer Protocol -- HTTP/1.1


A http://www.uptimes.net/ Faker  

Type: application
Added by: inter
Entered: 15/08/2000
Last modified: 08/12/1999
Rating: * (8 votes)
Views: 8083
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 :-)


Amazon Affilate Grabber  

Type: code fragment
Added by: til
Entered: 27/03/2000
Last modified: 08/12/1999
Rating: ***** (9 votes)
Views: 16840
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 latest mailing list archive  

Type: code fragment
Added by: idban
Entered: 29/07/2000
Last modified: 08/12/1999
Rating: **** (6 votes)
Views: 7878
another version of php-general archive grabber
( this one use marc.theaimsgroup.com )


Anti-leech  

Type: code fragment
Added by: Odey_dot_com
Entered: 01/08/2000
Last modified: 08/12/1999
Rating: **** (10 votes)
Views: 10228
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...


Apache Web Server Log File Display Script  

Type: application
Added by: munkfish
Entered: 12/09/2001
Last modified: 09/12/2000
Rating: - (fewer than 3 votes)
Views: 8761
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.


Checking peoples online (the grabbing countinues...)  

Type: code fragment
Added by: idban
Entered: 14/03/2000
Last modified: 01/12/2007
Rating: *** (9 votes)
Views: 9365
This program werk for checking someone online on Mailinglist on egroups
this sample checking it-center mailing list and find someone called Made
Wiryana if we found him so print that he online vice versa
hoply this program usefull for you


Convert US.  

Type: code fragment
Added by: Bomm21
Entered: 14/07/2001
Last modified: 07/12/2000
Rating: - (fewer than 3 votes)
Views: 5133
Currency Conversion U.S. Dollar


Creating HDML Page  

Type: code fragment
Added by: shane39
Entered: 13/06/2001
Last modified: 06/12/2000
Rating: - (fewer than 3 votes)
Views: 4997
This code snippet shows how to send a PHP powered HDML page to a wireless device such as a cell phone, PDA, etc.


Custom session functions  

Type: class
Added by: Syberius
Entered: 09/01/2003
Last modified: 03/12/2002
Rating: **** (6 votes)
Views: 11764
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.


Displaying WML pages with PHP  

Type: code fragment
Added by: shane39
Entered: 13/06/2001
Last modified: 06/12/2000
Rating: - (fewer than 3 votes)
Views: 5928
How to display PHP powered WML pages for wireless use in cell phones, PDAs, etc.


Dynamic Pages with no '?'  

Type: code fragment
Added by: bakins
Entered: 28/07/2000
Last modified: 08/12/1999
Rating: ***** (12 votes)
Views: 14150
A way to use full key=value type queries without using '?'. Useful for making a page for search engine friendliness.


ENOM reseller helper  

Type: class
Added by: conrad_escape
Entered: 28/01/2004
Last modified: 01/12/2003
Rating: - (fewer than 3 votes)
Views: 4282
see code comments


Fake Apache DirectoryIndex Listing  

Type: code fragment
Added by: flight553
Entered: 10/03/2001
Last modified: 03/12/2000
Rating: - (fewer than 3 votes)
Views: 20569
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


Forcing MSIE to download files with the proper name  

Type: code fragment
Added by: cYbErDaRk
Entered: 29/08/2002
Last modified: 09/12/2001
Rating: - (fewer than 3 votes)
Views: 5615
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.


Google Domain Collection  

Type: application
Added by: castamaster
Entered: 06/09/2001
Last modified: 09/12/2000
Rating: - (fewer than 3 votes)
Views: 5339
This simple code work for collection domain(co.*) from google.com


Grabbing Dictionary(2)  

Type: application
Added by: emha
Entered: 18/05/2001
Last modified: 05/12/2000
Rating: *** (4 votes)
Views: 5163
Grabbing English-Indonesian Dictionary from www.kamus.web.id put it in your page. Only display the result from the keyword you search.


Grabbing tools  

Type: code fragment
Added by: idban
Entered: 02/03/2000
Last modified: 07/12/2001
Rating: **** (11 votes)
Views: 23058
Grabbing some html put it in your page, i hope this is use full for you,
you can grab any information from net and put it on your page as your
information :) btw be sure to ask permission from the site before you grabbing their
info :) they gonna bombed ( hits i mean ) like your page hited!


Grabbing tools II  

Type: code fragment
Added by: idban
Entered: 26/03/2000
Last modified: 07/12/2001
Rating: **** (12 votes)
Views: 12676
Grabbing some html put it in your page, i hope this is use full for you,
you can grab any information from net and put it on your page as your
information :) btw be sure to ask permission from the site before you grabbing their
info :) they gonna bombed ( hits i mean ) like your page hited!

note:

on this version will cover the error if the target site down!


grab_domain  

Type: code fragment
Added by: amiller
Entered: 24/05/2001
Last modified: 05/12/2000
Rating: - (fewer than 3 votes)
Views: 5312
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.


HTTP 1.1 and 1.0 Cache Validator  

Type: code fragment
Added by: gallir
Entered: 26/01/2001
Last modified: 01/12/2000
Rating: - (fewer than 3 votes)
Views: 9209
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.


HTTP Referral Validation  

Type: code fragment
Added by: mvilla213
Entered: 04/11/2000
Last modified: 01/12/2000
Rating: - (fewer than 3 votes)
Views: 7377
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.


ICQ Pager  

Type: class
Added by: shiftmethod
Entered: 12/10/2000
Last modified: 01/12/2000
Rating: **** (4 votes)
Views: 7201
A simple class to send ICQ Pager.


ICQ Status Checker  

Type: code fragment
Added by: billzeller
Entered: 13/07/2000
Last modified: 08/12/1999
Rating: **** (8 votes)
Views: 18483
The function get_status($uin) checks the icq status of of the uin "$uin". The possible "returns" are online, offline, disabled, and unknown.

Please report any bugs, comments, or ideas on how to improve this script to me.

A similiar script is available here.


LockDown Pro Anti-Leech Bandwidth Protector  

Type: application
Added by: Odey_dot_com
Entered: 10/01/2001
Last modified: 01/12/2000
Rating: - (fewer than 3 votes)
Views: 7294
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  

Type: application
Added by: astrix
Entered: 06/11/2000
Last modified: 01/12/2000
Rating: **** (5 votes)
Views: 7393
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 url  

Type: code fragment
Added by: tim
Entered: 02/03/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 8387
Modify GET variables in a URL.


my.mp3.com playlist shuffler  

Type: class
Added by: khote
Entered: 11/06/2001
Last modified: 06/12/2000
Rating: - (fewer than 3 votes)
Views: 5479
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.
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


PHP4 Session handling helper HTML file  

Type: code fragment
Added by: yohgaki
Entered: 12/02/2001
Last modified: 04/12/2000
Rating: - (fewer than 3 votes)
Views: 13519
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.


PHP4 User Defined Session Handler for PostgreSQL  

Type: code fragment
Added by: yohgaki
Entered: 10/02/2001
Last modified: 04/12/2000
Rating: - (fewer than 3 votes)
Views: 11820
This is an example user defined session handlers for PostgreSQL. It includes some functions to access session data as an example


phpODP Class  

Type: class
Added by: gren
Entered: 14/04/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 6104
I hope this is in the right catagory...heh.

A class for retrieval of ODP catagory data. This class sets a small number of variables to allow you to output the data retreived anyway you want.

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.

In this newer version (1.0UF2), i made it possible to output RSS for each catagory pulled from the ODP.



Post as Get Method  

Type: code fragment
Added by: crackbaby
Entered: 01/06/2000
Last modified: 08/12/1999
Rating: ***** (4 votes)
Views: 8452
Use this code to make a Post method act like a Get method.


PostIt  

Type: code fragment
Added by: Darguz
Entered: 13/03/2000
Last modified: 02/12/2000
Rating: **** (6 votes)
Views: 11559
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 POSTed variables  

Type: code fragment
Added by: ADMIN
Entered: 18/01/2000
Last modified: 08/12/1999
Rating: **** (12 votes)
Views: 9986
Print all variables that arrived by POST, including arrays


simple redirection  

Type: code fragment
Added by: idban
Entered: 06/12/2000
Last modified: 07/12/2001
Rating: *** (3 votes)
Views: 19243
for designer who use many htmls for his/her site to spesific browser, this is just a sample you can customise by your self.


small function that validate arguments passed by GET/POST or others  

Type: application
Added by: yszhang
Entered: 12/11/2002
Last modified: 01/11/2001
Rating: - (fewer than 3 votes)
Views: 4698
a small function that can validate arguments passed by GET/POST. can be use on any arguments validation case.


Space Eater  

Type: code fragment
Added by: idban
Entered: 24/04/2000
Last modified: 08/12/1999
Rating: **** (8 votes)
Views: 6175
if u use any (text) variable for your ID you will have problem with browser compatibility,
how to get rid off from space? u can use this.


Sub-Domain Redirect/WorkAround  

Type: code fragment
Added by: Plove
Entered: 09/11/2001
Last modified: 01/11/2000
Rating: - (fewer than 3 votes)
Views: 5493
This will allow your users to be redirected according to wub-doamin prefix.


URL sanity checker and rebuilder  

Type: code fragment
Added by: julian7
Entered: 05/01/2001
Last modified: 01/12/2000
Rating: - (fewer than 3 votes)
Views: 5325
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'.


URL string from array of variables  

Type: code fragment
Added by: twilop
Entered: 16/11/2000
Last modified: 01/12/2000
Rating: - (fewer than 3 votes)
Views: 5903
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.


User Agent Info  

Type: class
Added by: risko
Entered: 14/11/2003
Last modified: 02/11/2002
Rating: - (fewer than 3 votes)
Views: 5452
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.


WAP and WEB TV redirect  

Type: application
Added by: navex
Entered: 19/08/2000
Last modified: 08/12/1999
Rating: - (fewer than 3 votes)
Views: 10451
This top lines inserted in index.php preserves the same URL to WAP, WEB TV or traditional browsers users. Example: Instead of http://nave.net/wap , http://nave.net/webtv and http://nave.net ,all users goes to http://nave.net with any browser and be redirected to correct patch.


Web Page Update Check  

Type: class
Added by: amnuts
Entered: 14/01/2004
Last modified: 01/12/2003
Rating: - (fewer than 3 votes)
Views: 6269
This class allows you to check to see if a particular website has been updated recently. It doesn't show what the changes were, just the fact that it's been altered in some way since you last checked the site.


Yahoo Status Checker  

Type: code fragment
Added by: billzeller
Entered: 17/07/2000
Last modified: 08/12/1999
Rating: **** (3 votes)
Views: 10265
The function yahoo_status($user) checks the yahoo status of of the user "$user". The possible "returns" are Online, Offline, and Unknown.

Please report any bugs, comments, or ideas on how to improve this script to me.



Search



This Category All Categories