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?
Did you know?Explore Trending and Topic pages for more stories like this.
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

Inserting a variable in a link
I have this code that I want to insert for my own variable but I have no idea how. This is what I wa

How to read CSS message data
Hi,
I have a requirement here. When working as a Dev angel for multiple customers its really di

Calender Not Opening
The following code is not loading the javascript calender in another window. It's not doing anything

SWF image using php?
Hello once again.

My latest en devour requires me to produce an image of a static .swf that i

iMatch stored value with the current value in a loop
Hello,

I have a MySQL db were I store articles in.

I have a form to fill these article

Help with ORDER BY
Hello. I would like to order by ascending States, then Cities, then Gyms in the following code, but

PHP Upload issue
Hi guys,

I have stumble across an interesting issue with my script and is doing my head in.

Simple PHP/Java Help..
Hi,
I'm trying to build a little program to do with calculating postage. Unfortunately i haven't

login to other site by sending post variables
hey,

here is my problem: my school gave me a mail account for school-stuff use. they mail us

Certain files upload, while others do not
I want to read the data from an uploaded file. Not sure why, but it only uploads for certain files.

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