You are currently browsing the category archive for the ‘phpcode’ category.

I use google several times a day. Like me there a lot of people are using google for several times a day. Google is earning a lot form us. But does google concern of our security any where? They should think of it. Todays date if google stop there mail service and start to do business with something else do you think we will get our important data which are there in google data center.

I know 99.9% people say google will never stop there business but any how if this happen. Do we get our databack form google. I have talked about it to Matcutts that we need a backup system of our mailbox just need to archive that mail form there mail to anywhere in my desktop or in my server. They promised they will implement it but still no solution.

I think security of google is not too intact that we can use there service for long term.

Please add your comment may be google listen to us after sometime.


Have you interest to install who is lookups on domain names. Here is an exciting php script you need to install.

Steps to install.


function whois ($query, $server = “”) {
$handle = fsockopen ($server, 43);
fwrite ($handle,$query);
while (!feof ($handle)) {
$results .= fread ($handle, 102400);
if ($server == ‘’) {
preg_match (‘#Whois Server: (.*)#’, $results, $matches);
$results = whois ($query, $matches[1]);
return $results;
echo whois ($_REQUEST[‘domain’]);

For Linux Server use this code :


$domain = $_REQUEST[‘domain’];
$output = shell_exec(“whois $domain”);
echo $output;

Copy this code and paste it in a file called whois.php in your root directory

2. Open the web browser type

Now you can check who is of any domain from your site.
Enjoy coding. 🙂

Those who want to add a class for whois Download from here

Today one of my internet friend share with us a php code to fetch alexa ranking.

  • All you need to do copy the code from here.
    $Url = $_GET[‘url’];
    function getPage ($url) {
    if (function_exists(‘curl_init’)) {
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    return curl_exec($ch);
    } else {
    return file_get_contents($url);
    function getAlexaRank($url) {
    $url = @parse_url($url);
    $url = $url[‘host’];
    $url = “$url&#8221;;
    $data = getPage($url);
    preg_match(‘#<POPULARITY URL=”(.*?)” TEXT=”([0-9]+){1,}”/>#si’, $data, $p);
    $value = ($p[2]) ? number_format($p[2]) : 0;
    return $value;
    $Rank = getAlexaRank($Url);
    echo $Rank;
  • Save the file in your site
  • Now run the file from browser

Easy and simple step to get any of your website alexa ranking from your site.
Thanks to share this valuable code -NB-

Blogs I Author

Blog Stats

  • 9,007 hits

Top Clicks

  • None

Blogs I read

My Blog Links to ……

May 2018
« Aug    

Believe in smart work not hard work