# UNIX C Send data to PHP

**URL:** <https://community.unix.com/t/unix-c-send-data-to-php/361305>\
**Category:** Programming\
**Created:** [July 7, 2016, 11:11am UTC](https://community.unix.com/t/unix-c-send-data-to-php/361305 "2016-07-07T11:11:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![freaky4552](https://community.unix.com/letter_avatar/freaky4552/32/5_5575768a8748004e209b776fc1b2916d.png) [@freaky4552](https://community.unix.com/u/freaky4552)\
**Post date:** [July 7, 2016, 11:11am UTC](https://community.unix.com/t/unix-c-send-data-to-php/361305/1 "2016-07-07T11:11:28Z")

</div>

Helo, i try send data from Unix to PHP. What is the correctly way to do this ?

i try:

c  
char command [100];  
sprintf(command , "php import.php %s",my\_vars);  
system(command );

php  
$my\_data = @ $argv[1];

this work, but i am not sure that is the right way. an the special chargers are not in php site. (😉

who can me say the best way to do this ?

thank you

---

<div class="post-metadata">

**Author:** ![Corona688](https://community.unix.com/letter_avatar/corona688/32/5_5575768a8748004e209b776fc1b2916d.png) [@Corona688](https://community.unix.com/u/Corona688)\
**Post date:** [July 27, 2016, 12:05pm UTC](https://community.unix.com/t/unix-c-send-data-to-php/361305/2 "2016-07-27T12:05:21Z")

</div>

Without seeing more of what you're doing it's impossible to say.

What are "special chargers"?
