I need to import some data from MySQL database to analyze and display using Processing I have PHP code to query and get data from MySQL. Is there any way I could call my PHP from processing? Appreciate your help.
Thanks in advance, Hasala
I need to import some data from MySQL database to analyze and display using Processing I have PHP code to query and get data from MySQL. Is there any way I could call my PHP from processing? Appreciate your help.
Thanks in advance, Hasala
This below is a total poach from internet. I wouldn't know Processing if it fell on my head.
So yes it seems quite possible.
String ip="12.215.42.19";
String[] data=loadStrings("http://api.hostip.info/get_html.php?position=true&ip="+ip);
//will give an array of strings, one per line e.g.
/*
data[0]="Country: UNITED STATES (US)"
data[1]="City: Sugar Grove, IL"
data[2]=""
data[3]="Latitude: 41.7696"
data[4]="Longitude: -88.4588"
data[5]="IP: 12.215.42.19"
*/
Edit: Pretend the below .html is a .php
String lines[] = loadStrings("http://processing.org/about/index.html");
println("there are " + lines.length + " lines");
for (int i = 0 ; i < lines.length; i++) {
println(lines[i]);
From:
the