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

email form (cannot find the problem)
Hello there. I've been having trouble with an email form. Can't find the problem really. I've tested

Is it possible to put an entire 500-page book in a database with PHP?
I am working on an intranet and I was wondering if its possible to code php with mysql to enter a fu

Showing selected item at top of list
Hi,

I've got a list of names which i am fetching from database like this:
$qry = db_query

Need help PLEASE
ok i have this warning showing up

Warning: in_array() [function.in-array]: Wrong datatype for

Sending UDP Raw socket
I truly need help on this. I am trying to write a test program that simulate a network environment

Problem with umlauts and UTF-8
Hello every1,

I'm creating my own little CMS at the moment and got some problems with the cha

adding 0 to numbers
Hey guys i need to create a 00001 number in a loop. Is there a better way of forcing a 5 digit numbe

How to Detect it is public_html or httpdocs?
How to check whether it is cPanel or Plesk?

If it found public_html perform <?php incl

Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?

here is my code

storing results of a function - previous result overwritten with new result
I have created a function to validate input.

function validate_dimension($value,$name) {
<

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