Sep 16

// Create query string

String queryString = "param1=" + 
   URLEncoder.encode(param1Value, "UTF-8");
queryString += "&param2=" +
   URLEncoder.encode(param2Value, "UTF-8");
    
// Make connection

URL url = new URL("http://www.obiweb.com.au"+queryString);
URLConnection urlConnection = url.openConnection();
    
// Read the response

BufferedReader in = new BufferedReader(
   new InputStreamReader(urlConnection.getInputStream()));
String line = null;
while ((line = in.readLine()) != null)
{
   System.out.println(line);
}
in.close(); 

written by objects \\ tags: , , , ,

Sep 06

Leopard (10.5) was the first release of MacOS that included PHP 5 support. However by default it is disabled.
To enable it you need to uncomment (remove the #) from the following line in /private/etc/apache2/httpd.conf.

#LoadModule php5_module libexec/apache2/libphp5.so

Then restart apache

sudo /usr/sbin/apachectl restart

written by objects \\ tags: , ,