Created
February 9, 2012 12:17
-
-
Save wescleymatos/1779589 to your computer and use it in GitHub Desktop.
Submeter dados por post para uma página remota
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $content = http_build_query(array( | |
| 'cidade' => 'Rio de Janeiro', | |
| 'tipo' => 'Apartamento', | |
| )); | |
| $context = stream_context_create(array( | |
| 'http' => array( | |
| 'method' => 'POST', | |
| 'content' => $content, | |
| ) | |
| )); | |
| $contents = file_get_contents('http://exemplo/teste.php', null, $context); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment