Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7596665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:58:22+00:00 2026-05-30T21:58:22+00:00

OK, I am creating a grails project, but I have php legacy code. Rather

  • 0

OK, I am creating a grails project, but I have php legacy code. Rather than re-invent the wheel, is there a way to call the php code from my groovy?

For example, there is a php script called post_handler.php that has a postRequest method that has $data (the data required to do the post) as the input param. How would I go about just calling post_handler->postRequest(data)? I’m sorry if this question has already been asked and answered. I looked and couldn’t find anything.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:58:23+00:00Added an answer on May 30, 2026 at 9:58 pm

    I would probably put a thin API on top of your PHP code that would allow you make REST calls that return JSON. You can then very easily use your existing PHP as a data layer if you so choose. You can use HttpBuilder to very easily make calls to an external REST service and then it will demarshall the JSON string to an object.

    If a web service is too slow for your communication layer, you may want to look at Thrift. Facebook uses this to communicate between PHP and Java. There are some tutorials here if you want to check it out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a grails app over a legacy database. There is a table out
I am creating a new Grails project that uses some Java code to do
The standard way of creating URLs in grails is: <a href=${createLink(controller:'news', action: 'show', params:
I have a Grails 2.0.0 project that was created using grails create-app . In
I'm working on a grails legacy project. A domain class called User exists. It
i have a deployed grails apps on tomcat6 in my client server machine, but
The Grails routing plugin makes creating Apache Camel routes at compile-time trivial. Is there
I'm creating a DB web application with grails for my company and found myself
I'm Creating a website for online reading stories using grails and i'm facing a
I'm developing a Grails web application (mainly as a learning exercise). I have previously

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.