Created
September 12, 2016 02:18
-
-
Save calebcgates/9d433d09d64153f433492293bf171647 to your computer and use it in GitHub Desktop.
This file contains 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 | |
//http://stackoverflow.com/questions/3080146/post-data-to-a-url-in-php | |
$url = 'http://www.someurl.com'; | |
$myvars = 'myvar1=' . $myvar1 . '&myvar2=' . $myvar2; | |
$ch = curl_init( $url ); | |
curl_setopt( $ch, CURLOPT_POST, 1); | |
curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars); | |
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1); | |
curl_setopt( $ch, CURLOPT_HEADER, 0); | |
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1); | |
$response = curl_exec( $ch ); | |
/* | |
phonebook, post variables: basictext, and status (student,faculty) to results.php < probably returns json object names, and emails | |
-- can also explore advanced search | |
*/ | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment