Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Simple data handler
February 8, 2007, 3:33 pm
rate this thread
need to do is take a $_GET values from the Mini (in this case,
specifically "query"), format it into a URI to pass off to another
script, get the results from that script in XML, and hand that XML
back off to the Mini. So basically it acts as a go-between, and
simple translator for the initial request.
So, the OneBox sends a request like:
The script turns that into:
Then it gets the XML from that and just returns it to the OneBox as
This is my first dive into some actual PHP development work, so I'm
having a slow time getting any real traction to start out, but I
figure if I can get this rolling, it won't be hard to flesh out.
Re: Simple data handler
making the URI that needs to be queried, but then returning the
results is where I am a little stuck at. I was thinking something
$isbn = $_GET["query"];
$key = "XXXXXXXX";
$link = "http://isbndb.com/api/books.xml?access_key =" . $key .
"&index1=isbn&value1=" . $isbn;
$xml = @simplexml_load_file($link) or die ("no file loaded") ;
I don't know if that'd be right or not, but I do know that if it is,
I'm not sure how to make sure that data gets returned to the OneBox.
The idea seems simple enough, but I fear I might be just a tad in over
- » php reference in <SCRIPT> tag gives "Error on page" in IE6.0
- — Previous thread in » PHP Scripting Forum