Create a Search Box using CSS/HTML

search_box_v2

Nowadays, most websites come with a search box to improve surfing experience. To make your website looks good, beside having a nice looking theme, you would need a fancy search box to replace the classic ones. Let’s start 1. Design your own search box 2. Crop it out Make sure the background color outside the search box is the same as your design....

PHP: Using SOCKS4 with SSL connection

Please read first: PHP SOCKS4 Interface Try to grab data from a HTTPS page like: https://www.google.com $sock = fsocks4sockopen('199.127.98.31','1080','www.google.com','443'); if(!$sock) die('error'); $packet = "GET / HTTP/1.1 Host: www.google.com:443 Content-Type: application/x-www-form-urlencoded User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0.1) Gecko/20100101 Firefox/8.0.1 Connection: close "; fwrite($sock,$packet); $res = ''; while(!feof($sock)){ $res .= fgets($sock,4096); } var_dump($res); we get a empty string string(0) "" or an error 400 Bad Request: string(526) " 400 Bad Request Bad Request Your browser sent a request that...

PHP SOCKS4 Interface

SOCKS was originally developed by David Koblas and subsequently modified and extended by me to its current running version -- version 4. It is a protocol that relays TCP sessions at a firewall host to allow application users transparent access across the firewall. Because the protocol is independent of application protocols, it can be (and has been) used for...

MD5 Encrypting Password

MD5

The MD5 Message-Digest Algorithm is a widely used cryptographic hash function that produces a 128-bit (16-byte) hash value. Specified in RFC 1321, MD5 has been employed in a wide variety of security applications, and is also commonly used to check data integrity. MD5 was designed by Ron Rivest in 1991 to replace an earlier hash function, MD4. An MD5...

How to creat PHP Login Script

Metal-php-login1

Learn to create a simple login system with php + mysql script, this tutorial is easy to follow, teach you step by step. Overview In this tutorial, we create 3 php files for testing our code. 1. login.php 2. checklogin.php 3. login_success.php Steps 1. Create table "members" in database "test". 2. Create file login.php. 3. Create file checklogin.php. 4. Create file login_success.php. 5. Create file logout.php STEP1: Create...

PHP: 4shared.com API wrapper

1. Fetch File Information There are two formats of 4shared.com's link download: Format 1: like: http://www.4shared.com/file/253231421/73f7da19(/GoodFellas.html)? http://www.4shared.com/file/246032259/f70f9982(/_online.html)? Format 2: like: http://www.4shared.com/video/ABBPbvS8(/Divided_Heart.html)? ()? meaning yes or no step 1 using regular expression to detect format of link: with format 1, fileID is 253231421 or 246032259 with format 2, we use API's function: decodeLink to find fileID $regexp = "/^http://(www.)?4shared.com/((file/(d+)/+)|(+/+))(/+)?$/"; Format 1: $url = "http://www.4shared.com/file/253231421/73f7da19/GoodFellas.html"; preg_match($regexp,$url,$m); var_dump($m); result: array(7) { => string(62) "http://www.4shared.com/file/253231421/73f7da19/GoodFellas.html" => ...

Getting data without risking death with PHP, CURL

ds-curlicon

Introduction PHP supports libcurl, a library created by Daniel Stenberg, that allows you to connect and communicate to many different types of servers with many different types of protocols. libcurl currently supports the http, https, ftp, gopher, telnet, dict, file, and ldap protocols. libcurl also supports HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading (this can also be done with...