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 7006711
In Process

The Archive Base Latest Questions

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

I have a php file that runs as a cron job. That file gets

  • 0

I have a php file that runs as a cron job. That file gets all the football games of the day with curl once per day and stores them in a database. So the table nextgames has the following:

HomeTeam, AwayTeam, League, Odds of various things such as 1,X,2 under etc (doesn’t matter).

For each of those games I want to run some R code. So basically, inside the php script I need to run a command like:

exec("Rscript <path>/myscript.R");

My first question is: In that script I need to pass HomeTeam, AwayTeam and League. So how do I pass those variables to the script?

My second question is: That script has as a result a 7×7 matrix that represents the probabilities for each of the teams score 0, 1, 2, 3, 4, 5 or 6 goals. How do I get that data back to php?

PS: I can’t install rapache to the webhost I am atm.

  • 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-27T21:30:45+00:00Added an answer on May 27, 2026 at 9:30 pm

    Check out the example on the proc_open docs page: http://php.net/manual/en/function.proc-open.php

    What I would suggest is outputting the contents of your matrix as some portable format, such as JSON (it appears R can do JSON). Then just json_decode the output from the R script.

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

Sidebar

Related Questions

I have a cron job that needs to include this file: require '../includes/common.php'; however,
First I have a PHP file that gets data and file from a HTML
I have a process defined in a batch file that runs 3 php scripts,
I have a php file that runs a simple jquery script: var text =
I have a php file that contains class which runs some lengthy database operations.
I have a mysql query that runs in a php file that outputs a
I have a .py file that a php file runs like this: $link =
I have cron jobs setup that runs a few PHP scripts often. The issue
I'm trying to setup a PHP file as a cron job, where that PHP
I have a PHP file that contains a lot of if and else statements

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.