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

  • Home
  • SEARCH
  • 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 3342030
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:47:27+00:00 2026-05-18T00:47:27+00:00

I am writing a WordPress plug in php in and next step is some

  • 0

I am writing a WordPress plug in php in and next step is some kind of add on to this plug in.

The add on would scrape data from web, sending forms etc. I have this part almost ready from the time before I had any thoughts about WordPress plugin – it’s coded in ruby using mechanize. I haven’t found anything similar to mechanize in php anyway.

But I do not know what is the best way to call my ruby script from WordPress. Some tasks will be managed by cron. What about the ones based on user request?

  • php script only triggers the ruby script. It won’t wait/require anything from ruby’s output
  • WordPress plugin is fully portable and functional without ruby script. Ruby adds on something more. If somebody requires it.
  • everything will be running on my linux server where I have a root access
  • 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-18T00:47:28+00:00Added an answer on May 18, 2026 at 12:47 am

    A WordPress plugin that depends on Ruby isn’t going to be portable. That’s OK if you’re the only one who will be using it, though.

    If the Ruby script needs to return a result that will be used immediately by the PHP script that’s calling it, then something like exec() is the only way. Make sure you escape any arguments you pass to the Ruby script; otherwise you’ll be vulnerable to injection attacks.

    If the Ruby script doesn’t need to return a result immediately (e.g. some background processing, such as thumbnail generation) then I think the best way would be for the PHP script to insert a row into a MySQL database or something similar. The Ruby script can work in the background or run from cron, check the database periodically for new jobs, and do whatever processing it needs to do. This approach avoids the performance overhead and security issues of exec(), and it’s arguably also more scalable. (A similar approach would have the Ruby script listen on a socket, and your PHP scripts would connect to the socket. But this requires more work to get it right.)

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

Sidebar

Related Questions

I'm writing a plug-in for WordPress which in fact will be a separate ordering
I am writing a wordpress plugin. I would like to to set the post
I am writing a wordpress plugin that redirects the user. for some reason, wp_redirect
i am writing a site from scratch using php/mysql and am using GET requests
I am writing a website based off of wordpress and am having some difficulties.
Writing some test scripts in IronPython, I want to verify whether a window is
Writing the code for the user authentication portion of a web site (including account
Writing something like this using the loki library , typedef Functor<void> BitButtonPushHandler; throws a
I'd like if someone could give me some advice on creating this script, which
I am brand new at writing Wordpress plugins, so to start I am trying

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.