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

Downloading file (Headers)
I'm trying to make users download a file, but they must wait 60 seconds before it begins.

But

Header redirect
Hello ive got a problem ive got form with its action set to itself.
Code: <form id="f

Simultaneous select/update/insert
Hi

How would I need to go about when 2 users update a single row simultaneous? And how would

Help with forum quoting?
Hi im working on a forum and I have alomost finished it but i want a user quote system like twitter

ORA-01655: unable to extend cluster SYS.C_FILE#_BLOCK# by 128
Hi all,

Oracle 10g. Linux.

I'm facing the below error while trying to import a dumpfil

Redirect not working after making a POST/GET
Hi Everyone,

I am a novice in PHP. Here I have 2 pages, one page with a textbox and button an

simplexml_load_file and rss problem
Hi,

I have a problem parsing an rss feed using simplexml_load_file - this is strange as i hav

OOP help
okay so i have a class im making it has everything setup i just need to randomize the 2 variables an

writing a screen scraper
Hello,

I'm writing a screen scraper application and want to be able to get absolute addresses

this code is not working????
it says this error.. Warning: Division by zero in ..

the variables are correct, so why is th

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