# PHP mastermind needed here

**URL:** https://forum.kirupa.com/t/php-mastermind-needed-here/56402
**Category:** programming
**Created:** [July 3, 2004, 8:20pm UTC](https://forum.kirupa.com/t/php-mastermind-needed-here/56402 "2004-07-03T20:20:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![fluid\_tw0](https://avatars.discourse-cdn.com/v4/letter/f/48db29/32.png) [@fluid\_tw0](https://forum.kirupa.com/u/fluid_tw0)
#### Post date: [July 3, 2004, 8:20pm UTC](https://forum.kirupa.com/t/php-mastermind-needed-here/56402/1 "2004-07-03T20:20:47Z")

</div>

i have (probably noob) question here:

is there any way to pass variables directly from php file to another php file using POST method BUT without using forms, flash or anything except PHP :q:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 3, 2004, 8:34pm UTC](https://forum.kirupa.com/t/php-mastermind-needed-here/56402/2 "2004-07-03T20:34:28Z")

</div>

[http://ca3.php.net/curl](http://ca3.php.net/curl)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 4, 2004, 9:22am UTC](https://forum.kirupa.com/t/php-mastermind-needed-here/56402/3 "2004-07-04T09:22:43Z")

</div>

thx

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 4, 2004, 9:43am UTC](https://forum.kirupa.com/t/php-mastermind-needed-here/56402/4 "2004-07-04T09:43:18Z")

</div>

If your host doesn’t provide the curl library, they may provide the curl executable - it’s a bit of a hack, but you can use backticks (``) to execute the curl binary passing the correct options… something like this

```php

 $str = `curl -d "foo=foo&foo2=foo2" http://myurl/`;
 // $str is the result
 print $str;
 

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 4, 2004, 12:40pm UTC](https://forum.kirupa.com/t/php-mastermind-needed-here/56402/5 "2004-07-04T12:40:58Z")

</div>

sessions vars too, no…?
