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

1,000 select boxes with 100 options?!
I have 1 drop down select box with 1,000 options.


In some case, there will be 100+ of the

noob cURL help
I have a pretty basic form that I need to cURL post to a file in my includes folder (includes/login.

type check while uploading
Hi Everyone,

How can I check the exact type of a file while uploading on my site?

Here

Using system() and bringing back the results
I am aware that you can use system() within PHP to execute system commands, but I was wondering if t

How to copy a part of a vector in a raw memory
Hi,

How can I copy a part of a vector into a memory:

1
2
3
4
5

Connecion issue
Hi,

For some reason, I keep getting this error when trying to connect:

Warning: mysql_

Adding delete feature to my forum
Hello I am currently trying to add a delete feature to my forum. I believe I have everything built r

Multi language - seo links
Im trying to figure out the best method to have a multi language website that will function with seo

I didnt code this but I need help with it
I'm sorry. i'm not a coder. I have this script for forcing download and previewing mp3. The guy that

newbie error
what is wrong with this code ?

<html>
<body>

<?

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