Jump to content

How to pass a variable from bash-script to php file which accepts variable?


Recommended Posts

Hi Everyone,

 

Trying to pass ${EXTEN} to a php file for processing. Not sure how to. The php file takes $did_numb as defined:

 

<?php

$did_numb = $_GET['did_numb'];

?>

 

I know that http://serverIP/file.php?did_numb=416-444-5555  works fine but when calling php file by system() from dialplan how can this be done?

 

exten => s,n,system(php file.php?did_numb=${EXTEN})        ||||  This method doesn't work as "php file.php?did_numb=416-444-555" simply doesn't work from the CentOS prompt.

 

What is the proper syntax here?

 

I also want whatever that file.php returns to be saved in $var for later usage in dial-plan afterwards.

 

Thanks.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.