How can I get simba to go to a page and pick up on something? and return if that item is correct?
Any idea?
Thanks Mat
How can I get simba to go to a page and pick up on something? and return if that item is correct?
Any idea?
Thanks Mat
^^
Could you explain what you mean with?pick up on something
Working on: Tithe Farmer
Are you talking about a .txt file hosted on a server? if so then this should help:
Simba Code:program new;
Function GetInfo: String;
Begin
InitializeHTTPClientWrap(True); //initialize the HTTP client
Result := GetHTTPPage(0, 'URL here'); //get the info from the web page
Writeln(result); //write the result for debug purposes
FreeHTTPClient(0); //Free the HTTP client
End;
begin
if GetInfo = 'command here' then
Begin
ProcHere;
End;
end.
I haven't tested this. But it should work.
Last edited by Geo; 03-15-2012 at 06:55 PM.
Varrock gTanner
Previously known as England155.
Not sure if you want to use InitializeHTTPClientWrap.
@OP:
Don't know what you mean by pick up on something, but if you meant get the page the it responds with, the HTML is in the page variableSimba Code:var
Client : integer;
Page : string;
begin
Client := InitializeHTTPClient(False);
AddPostVariable(Client, 'Name', 'Value');
AddPostVariable(Client, 'Name', 'Value');
Page := PostHTTPPageEx(Client, 'http://example.com/post.php');
FreeHTTPClient(Client);
end..
Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
Originally Posted by #srl
"A programmer is just a tool which converts caffeine into code"
Like I want to make a page that gets there IP on load and checks if its in a database and will echo text on the page say 'yes' if its true or 'No' if its not in database.
^^
Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
Originally Posted by #srl
"A programmer is just a tool which converts caffeine into code"
GetPage also works to "visit" pages
I actually have all of this already written. I can share with you if you'd like.
Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
{ MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }
When posting a bug, please post debug! Help us, help you!
I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.
SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.
php Code:mysql_connect('host', 'user', 'pass');
mysql_select_db('database');
$q = mysql_query('SELECT * FROM table WHERE ip="' . mysql_real_escape_string($_SERVER['REMOTE_ADDR']) . '" LIMIT 0,1');
echo (mysql_num_rows($q) == 1) ? 'true' : 'false';
Last edited by Sex; 03-15-2012 at 07:19 PM. Reason: = -> ==
Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
Originally Posted by #srl
"A programmer is just a tool which converts caffeine into code"
Mine already has the addition and deletion of IP's built and everything tooJust as simple as yours
![]()
Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
{ MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }
When posting a bug, please post debug! Help us, help you!
I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.
SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.
There are currently 1 users browsing this thread. (0 members and 1 guests)