Run the below given command
java -jar start.jar
This can be used for restarting Apache solr as well .
Run the below given command
java -jar start.jar
This can be used for restarting Apache solr as well .
<?php
$output = file_get_contents(‘http://localhost:8983/solr/select?q=video&wt=php’);
eval(“$resultArray = ” . $output . “;”);
echo “<pre>”;print_r($resultArray);
?>
java -Ddata=args -Dcommit=no -jar post.jar “<delete><id>SP2514N</id></delete>”
You can add data using the below given command
java -jar post.jar data.xml
Make sure that you have changed the directory where post.jar and xml files are available from the shell.
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
After installing cURL you have to restart Apache using the below given command
sudo /etc/init.d/apache2 restart
Example :
<?php
$url = “www.example.com”; // Desired URL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$returned = curl_exec($ch);
curl_close ($ch);
echo $returned;
?>
<?php
java_last_exception_get();
?>
<?php
java_last_exception_clear();
?>