Archive | PHP

RSS feed for this section
PHP & CURL: step by step

PHP & CURL: step by step

After you read this article: Getting data without risking death with PHP, CURL, you’ve seen the power of CURL. I’ll write more about CURL to introduce a useful PHP class written by me and use it regularly. But first let’s take a CURL research through the examples, step by step: Example 1: GET, include response […]

Read full story Comments { 0 }
Page generated in seconds x.xxxx

Page generated in seconds x.xxxx

You’ve probably noticed at some sites a little message, mainly in the page footer, type ‘ Page generated in 0th seconds …. ‘or something similar. Here you can learn how to easily make using PHP microtime() function

Read full story Comments { 0 }
PHP: Methods to encrypt and decrypt with private key (part 3)

PHP: Methods to encrypt and decrypt with private key (part 3)

Please read PHP: Methods to encrypt and decrypt with private key (part 1) PHP: Methods to encrypt and decrypt with private key (part 2) Method 3: use xor encryption Example usage: result: It isn’t a nice result, we need to convert to a nice result: base64_encode Result: AAAAAAAAExoFFhsXRA== unpack Result: 000000000000131a05161b1744 To decrypt, we use […]

Read full story Comments { 0 }
CURL cookie.txt file format

CURL cookie.txt file format

CURL autogenerate file cookie.txt: # Netscape HTTP Cookie File # http://curl.haxx.se/rfc/cookie_spec.html # This file was generated by libcurl! Edit at your own risk. www.filefactory.com FALSE / FALSE 0 PHPSESSID 8dcolkh52m2eo4rv61aolurjd7 .filefactory.com TRUE / FALSE 1342341229 ff_referrer_hash HDAgPzI bitshare.com FALSE / FALSE 0 PHPSESSID qjv4u6g6k20s8brar2o17msk26 bitshare.com FALSE / FALSE 1342401324 last_file_downloaded b5b7gbwq freakshare.com FALSE /files/9q5hajyh/ FALSE […]

Read full story Comments { 0 }
PHP: Methods to encrypt and decrypt with private key (part 2)

PHP: Methods to encrypt and decrypt with private key (part 2)

Please read PHP: Methods to encrypt and decrypt with private key (part 1) Method 2: use arcfour algorithm Example usage: result: It isn’t a nice result, we need to convert to a nice result: base64_encode Result: 77cOFdy5O3YaciW/Zw== unpack Result: efb70e15dcb93b761a7225bf67 To decrypt, we use this code: We get the result: your password If we encrypt […]

Read full story Comments { 0 }
PHP: Methods to encrypt and decrypt with private key (part 1)

PHP: Methods to encrypt and decrypt with private key (part 1)

There are some methods to encrypt your data with a private key. Method 1: Note: your private key must have string length greater than 8. Example usage: result: ““0bhercjya In the resulting string has special characters. We will convert the resulting string into a nice result: base64_encode Result: YGBgYDBiaGVyY2p5YQ== unpack Result: 606060603062686572636a7961 To decrypt, we […]

Read full story Comments { 0 }
PHP: Using SOCKS4 with SSL connection

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 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 this server could not understand. Reason: You’re speaking plain HTTP to an SSL-enabled […]

Read full story Comments { 1 }
PHP SOCKS4 Interface

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 […]

Read full story Comments { 1 }

MD5 Encrypting Password

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 […]

Read full story Comments { 1 }