• Wordpress – disabling Nofollow option in links
    07 July, 2010

    First go to settings->Privacy settings. Select the following option -

    “I would like my blog to be visible to everyone, including search engines (like Google, Sphere, Technorati) and archivers”.

    Then go to appearance->editor and select Header.php. Here...

    more..

  • oracle pl/sql sample
    25 June, 2010

    Here is a simple example of using pl/sql in oracle

    – To enable output
    SET SERVEROUTPUT ON;
    – declare necessary variables
    DECLARE
    caseNumber    NUMBER;
    name    VARCHAR(200 BYTE);
    grade    VARCHAR(1 BYTE); 
    BEGIN
    – Lets consider we have a package named “SamplePackage” and it has a procedure named
    – “SampleProc” which has...

    more..

  • Sql Query to pull table name and column name
    15 April, 2010

    If you are looking to get all table name and column in a oracle schema you can use the following query

    SELECT * FROM DBA_TAB_COLUMNS WHERE OWNER = 'schema_name' ;
    

    If you want to get column names of a specific table then you can use the following query

    SELECT * FROM DBA_TAB_COLUMNS...

    more..

  • image resize function (transperant)
    26 April, 2009

    Found a great function for image resize in php. It requires php >= 4.3.0.
    I found the source in
    http://www.akemapa.com/2008/07/10/php-gd-resize-transparent-image-png-gif/

    <?
    function resize($img, $w, $h, $newfilename) {
        #
        //Check if GD extension is loaded
        #
        if (!extension_loaded('gd') && !extension_loaded('gd2'))...

    more..

  • Simple use of CURL
    05 January, 2009

    Here is a very simple structure of how to use curl with post method –

    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,'http://example.com/target.php');
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);	
    curl_setopt($ch, CURLOPT_POST , 1);// setting up to use post method
    curl_setopt($ch, CURLOPT_POSTFIELDS, array("fieldName1"=>"data1","fieldName2"=>"data2"));							
    $content = curl_exec($ch);
    curl_close($ch);
    
  • Stop cron job from sending output email
    05 January, 2009

    I created a cron job which needs to run every 5 minutes. So it was sending me 12 emails per hour and my inbox got overwhelmed by email pretty soon. I had plesk control panel and plesk won’t let you leave email field empty so I started to look...

    more..

  • Create wildcard subdomain using plesk
    28 November, 2008

    Its a mystery to me, why it is so hard to create a wild card sub domain in plesk. Any way here is how it is done.

    First go to Domains>domain.com>Dns Settings
    Then go to “Add record” and add the following record

    Record type: “A”
    Domain Name: *.domain.com
    IP Address: ip address...

    more..

  • how to edit a file in linux (vi command help)
    28 November, 2008

    There are lots of help out there about how to edit a file in linux, how to use vi, vi command list. But what I failed to find is a simple article which will just tell me
    how to open a file using vi, go to edit mode and finally...

    more..

  • Store file in MySql using PHP
    14 June, 2008

    Here is a good article on how to store file in mysql using php

    Blobbing Data With PHP and MySQL

  • Email validation function with DNS check
    08 June, 2008

    This is a simple email address validation function. It can be used as a spam guard in the contact forms. It takes the email address and checks for DNS record of the domain name. So, from an email address like: sample@domain.com, it looks for DNS records against sample.com....

    more..

« Older