Call JAVA CLASS in PHP Application

How to call java class in PHP.

Here is the simple way.

1. Create java file.
2. Compile and execute the java file in command line mode, make sure your JAVA code is correct.
3. Here is our sample php code. our java file name is EmployeeTest.

exec("java EmployeeTest",$output)or die ('GO HELL');

Above PHP code will execute the JAVA and return the output.

mycomputer set java path environment

Please read below URL for setting Path environment.

SFTP not working

#!/usr/local/bin/perl -w

use FindBin qw($Bin);
unshift(@INC, 'Net');
unshift(@INC, 'Net/SFTP');
unshift(@INC, 'Net/SSH/Perl');
unshift(@INC, 'Net/SSH/Perl/Util');

use Net::SFTP;
use Net::SSH::Perl;
my $host = "";
my %args = (
user => 'chshtst',
password => '4getmenot',
debug => 'true'

my $sftp = Net::SFTP->new($host, %args);
print "connected!";

cpan sftp error

Use of uninitialized value $ENV{"HOME"} in concatenation (.) or string at C:/Per
l/site/lib/Net/SSH/ line 108.
lenovo-PC: Reading configuration data /.ssh/config
lenovo-PC: Reading configuration data /etc/ssh_config
lenovo-PC: Connecting to, port 22.
lenovo-PC: Net::SSH::Perl Version 1.35, protocol version 2.0.
The getpwuid function is unimplemented at C:/Perl/site/lib/Net/SSH/Perl/
line 39, line 1.


Volume in drive C has no label.

this show

This is per tesitn


Get 10 digit phone number and replay that entered number

Below code snippet working fine in the

echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";

ivr sample code

IVR Application


dtmf working sample

echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";

[dtmf-1 dtmf-2 dtmf-3 dtmf-4 dtmf-5 dtmf-6 dtmf-6 dtmf-7 dtmf-8 dtmf-9]

Guess what the computer is thinking! Pick a number between 0 and 9.

combine two block into one block

display two block into one block

here one view block and another is content slider block

$content = '';
$block = '';
$module = 'views';
$delta = 'image_slider-block_1';
$block = module_invoke($module, 'block', 'view', $delta);
$content .= "";
$content .= "$block[subject]";
$content .= "$block[content]";
$content .= "";
$module = 'content_slider';
$delta = '1';
$block = module_invoke($module, 'block', 'view', $delta);

print array key and value

print array key and value


$array[0] = 'Monday';
$array[1] = 'Tueday';
$array[2] = 'Wedday';
$array[3] = 'Friday';

foreach $val (keys @array) {
print $val."=>".$array[$val]."\n";

Syndicate content