SSH- How to create php files in /var/www folder?

Question:  How can we create php files in /var/www folder using SSH command?
Answer:
-Create the file

sudo touch hello.php

-Open the file

sudo vi hello.php

Enter write mode (we were in command mode initially) by pressing  a  (note that    vi   is case sensitive)

After that, press Esc (to change to command mode) and type :wq Check if everything is fine with
cat hello.php

However, it's probably a better idea to use editors such as vim or nano as work with them is a lot simpler than that.

Wordpress- Contact form 7 : Validate comma separated urls

Question: How we can validate comma separated urls in for Contact form 7 plugin?

Answer: We can do this with contact form 7 filter.

For Example:

- If in form field is -

[textarea* yoururls]

- If we will put the url comma seperated .

- We can use below filter to custom validation in functions.php

add_filter( 'wpcf7_validate_textarea*', 'function_validate_urls', 20, 2 );
function function_validate_urls( $result, $tag ) {
    if ( 'yoururls' == $tag->name ) {
        $yoururls = isset( $_POST['yoururls'] ) ? trim( $_POST['yoururls'] ) : '';
        $error='noerror';
        $sepurl = explode(",",$yoururls);
        foreach($sepurl as $sep){
             $sep = preg_replace('/\s+/', '', $sep);
            if($sep!=''){
                if (filter_var($sep, FILTER_VALIDATE_URL)) {
                   // valid
                } else {
                    //invalid
                    $error= 'error';
                }
            }
        }
        if ( $error == 'error' ) {
           $result->invalidate( $tag, "Please check all urls in exact format." );
           // $result->invalidate( $tag, $error );
        }
    }

    return $result;
}