Created
July 15, 2013 22:24
-
-
Save prateeksachan/6004036 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 | |
$url = search_curl_url(); // returns SOLR_SERVER_HOSTNAME . ':' . SOLR_SERVER_PORT . '/solr/update/extract?' | |
$url .= 'literal.id=' . 'forum_file_' . $id . '&literal.module=forum&literal.type=3&literal.courseid=' . $post->course; | |
$params = array(); | |
$params[$id] = $file; // adds the $file stdClass object into $params array | |
$curl->post($url, $params); // sets CURLOPT_POST = 1 | |
// sets CURLOPT_POSTFIELDS = array ($id => '@' . $filepath) via add_to_curl_request | |
// finally posts this curl request | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment