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

Unique Visitor Tracking
Hello. Currently, I run a voting site where voters are tracked by their IP address and can only vote

Disable html within defined tags
I have a mysql database that allows users to enter content with html, but I also want to have a tag

Click counter to ignore traffic from search bots
I have a click counter on my site that...well, counts the number of clicks a link gets on the frontp

How to make a mail Form secure?
I want to create an email Form on my web site. How can I make the Form secure so the submitted info

Uploading files/images via forms
Hey all, I am building a database for work that will contain some minor data on plant species along

Help with Password Encoding/Decoding?
Trying to design a "change password" tool. On my signup code I'm using base64_encode, now

Creating web pages by php
Hello again,
I was just wondering us there a way to use a php script to create a new web page. I

need help in php variable
i have a php variable on one page
Code: [Select]$lastId = mysql_insert_id($db);
echo $lastId;<

URL Rewrite issue
Im created a series of Rewrites and on page checks to make sure the correct url is being called. But

Email logic not working
I would like to send an email using the php email() function then if it does execute i.e sends i wou

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