Jump to content

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


bruceb

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.