WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search


Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder



Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : redirect redirection ip address authentication authenticate addr
Categories : Authentication, HTTP, Network, PHP Update Picture
Jason Cathcart
Date : Aug 06th 1999
Grade : 2 of 5 (graded 5 times)
Viewed : 20067
File : No file for this code example.
Images : No Images for this code example.
Search : More code by Jason Cathcart
Action : Grade This Code Example
Tools : My Examples List

Submit your own code examples  Submit your own code examples 
 

Allow/disallow page access by remote users' ip address (or any other http variables).
I use this on "under construction" pages. It allows me to work on the page in place
but prevents any other hosts from accessing it.

Note: any header() must appear before any html.

<?php
if ( getenv("REMOTE_ADDR") != "10.0.0.1" ) {
header("Location: http://otherhosthere");
}
?>



PHP4 HTTP Compression Speeds up the Web
Categories : PHP, Zlib, HTML and PHP, HTTP, Network
Authentication HTTP protocol POST
Categories : Authentication, HTTP, PHP
HTTP Basic Authentication via POP3.
Categories : Authentication, HTTP, Email, PHP
Simple Password example
Categories : PHP, Authentication, Security, HTTP
WebServerSpy checks which kind of Webserver is running, Apache, Netscape, Fasttrack, IIS, HTTP-Header, HTTP 1.0, GET, spy, WWW
Categories : HTTP, Network, Apache, PHP, Web Servers
Check whether your referer is coming from your website or from someone else's. Very useful when you want to represent the data without your domain name for internel link-mapping in some COUNTER.
Categories : PHP, HTTP
Class that allows the PHP developer to establish connections with a POP3 mail server amd be able to list, retrieve and delete mail messages from a given mail box.
Categories : Network, Email, PHP, PHP Classes
Is there some possibility to link a database to an htaccess file, so that instead of having a passwd file you would have a database with DES-crypted password and username fields?
Categories : Authentication, PHP, General SQL, Databases
IPTables Bandwidth statics
Categories : PHP, Security, Network
base class to query the whois database
Categories : Network, PHP, PHP Classes
PHP3 Authentication using MySQL (also has nice query_db() function to return an array of arrays from a MySQL query result).
Categories : Authentication, MySQL, PHP
PHP Domain Availability Checker
Categories : PHP, Complete Programs, Regexps, HTTP, Sockets
Pseudo Non Parsed Header. Output to the the browser as the script runs.
Categories : PHP, HTTP, HTML and PHP
Authentication script to authenticate users in Active Directory through LDAP.
Categories : LDAP, Authentication, Cookies, PHP
Implementing a Members ONLY area
Categories : PHP, MySQL, Databases, Authentication
 Arnaud PONTONNIER wrote : 431
HELLO,

It`s a good program, but i need five seconds to see the 
php3 before to be redirected !
How can i do ?
Thanks

Arnaud.
 
 Boaz Yahav wrote : 433
Instead of using the header to redirect use a Meta Refresh TAG with time set to 5 seconds : 

&lt;meta http-equiv=refresh content="5; URL=http://otherhosthere"&gt; 

berber
 
 momo gunas wrote :451
I wonder how to have a file (txt) where we could put all unauthorized ip adresses.
The php script could compare remote users` ip address and existing ip adresses in the txt file and then allow.disallow access to the page !!

Thank you very much for your help !!

[email protected]