View Single Post
  #2  
Old 12-30-2005, 03:56 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
This is the preferred way of using the new functionality:

PHP Code:
function onCreated() {
  
this.req requestURL("http://www.graalonline.com/about/whatis.php");
  
catchevent(this.req,"onReceiveData","onData");
}

function 
onData(obj) {
  echo(
"got data: " obj.name " - " obj.returncode @
    
" - " obj.returnmessage " - " obj.server " - " obj.contenttype);
  echo(
"data: " obj.data.size());
  
this.req NULL;

It is working on serverside, but you must use ips instead of urls (194.5.30.4 instead of www.graalonline.com) otherwise it is crashing because of libc compatibility problems, will fix that soon.
It is currently only using HTTP 1.0, will try to check your problem soon.
Reply With Quote