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 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 am writing a plugin which grabs an array of data from the wordpress
I'm writing a plug-in for WordPress which in fact will be a separate ordering
I am writing a wordpress plugin that redirects the user. for some reason, wp_redirect
Quick question about Wordpress PHP: I am writing a theme and I want to
I'm writing my first Wordpress plugin and need to add a page that does
i'm writing my first plugin for wordpress and i have some doubts regarding the
context: im writing a favicon parser: http://plugins.trac.wordpress.org/browser/wp-favicons/trunk/includes/class-http.php and http://wp.leau.co/2011/03/18/handling-redirects-for-wp-favicons-with-redirects-set-to-0-with-wordpress-wp_remote_get/ I saw : http://www.foxfilm.nl/favicon.ico in
I am writing a wordpress plugin. I would like to to set the post
In WordPress MU, I've tried writing my own query for this but can't seem
I am writing a php function for wordpress that is executed through an XML

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.