Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-25-2006, 04:46 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
GServer - Webserver Interaction

This is a pretty basic example..
I just thought this would be helpful for anyone wanting to do this.
HTML Code:
function onCreated() {
 temp.link = "http://www.yourwebserver.com/test.php?test=123";
 temp.req = requesturl(temp.link);
 this.catchevent(temp.req,"onReceiveData","onData");
}
function onData(obj) {
 echo("Result:" SPC obj.fulldata); // obj.<var> the vars can be found at the bottom
}
Heres my PHP Code I used..
PHP Code:
<?php
 
foreach ($_GET as $index => $val)
  $
$index $val;
 echo(
"test = $test");
?>
Quote:
obj.<var>'s

THTTPRequest (TGraalVar):
address - string (read only)
contentlanguage - string (read only)
contenttype - string (read only)
downloadcomplete - boolean (read only)
file - string (read only)
fulldata - string (read only)
lastmodified - string (read only)
port - integer (read only)
returncode - integer (read only)
returnmessage - string (read only)
server - string (read only)
Notes:
-You could proabley make some pretty interesting things, like a stats server regarding you have knowledge of php and such.
-Experiment, requesturl("http://www.google.com") or something see what happens lol..
__________________
Quote:

Last edited by fowlplay4; 09-25-2006 at 04:57 AM..
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.