php call servlet


Posted on 16th Feb 2014 07:03 pm by admin

I have done a php backup application .
So there is a form that user pick some files to zip and download.
Because of a problem with greek characters I make a servet (java) to create the zip.
But I want to keep all validations that php make, so how can php send to servlet the post data after the validation?
I tried curl but with that nothing is dowloading.

Code: ...
//form has send files, use of yiiframework
if ($download->validate()) {
Yii::app()->myutilitie->afterAuth(Yii::app()->user
->name,'Front-end download files '.Yii::app()->user->name);
$ch = curl_init(self::JAVA_URL);
curl_setopt($ch, CURLOPT_POST ,1);
curl_setopt($ch, CURLOPT_POSTFIELDS ,$dfiles);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1);
// curl_setopt($ch, CURLOPT_HEADER ,1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1);
$Rec_Data = curl_exec($ch);
..

No comments posted yet

Your Answer:

Login to answer
236 Like 17 Dislike
Previous forums Next forums
Other forums

Accept only alpha characters
I've got this bit of code ready for accepting a phrase:

Code: if (!eregi ("", $_POS

Required to login help
I'm trying to set up my site so users have to be logged into the forum to access the site.I've been

Adding to an Int row in db
Hi, i have a database which houses all of the users of my site. One of the columns is for points whi

When i am Canseling the Billing Document in VF11 I am getting Shortdump
Hi Experts

When i am Canseling the Billing Document in VF11 I am getting Shortdump.

very easy question about SQL info
Hello,
I think that I have a very easy question.
I know how to create a form using php SQL and

Storing Values taken from a DB...
Using this code it will generate a short list from my database

<?php
mysql_connect

data type in column definition
Hi,
I create a table with column called "Direction of Travel code ".
The travel codes in t

Escaped characters
I have a script that allows you to post news to the home page of my site. Along with the news is the

quick question
Hi ..

i have a question
how do i set a var so it displays via an echo
Code: $logo = '&a

Socket programming
Hello all,

I have a PHP socket script. GPS trackers connect to this socket. IMEI verification

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash