Raised This Month: $51 Target: $400
 12% 

How to read some text from a web?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-02-2010 , 02:38   How to read some text from a web?
Reply With Quote #1

But the web is not mine,I just have access to view the text...

http://www.theweb.com/text.txt
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-02-2010 , 02:40   Re: How to read some text from a web?
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=63120
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-02-2010 , 03:09   Re: How to read some text from a web?
Reply With Quote #3

Yes,is the same if I copy&paste the text,but I need to read from the web.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-02-2010 , 03:18   Re: How to read some text from a web?
Reply With Quote #4

Quote:
Originally Posted by #8 SickneSS View Post
Yes,is the same if I copy&paste the text,but I need to read from the web.
What? That plugin basically reads files from the web and puts the data into a file on the server.
You can use that code as an example for reading files from the web.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-02-2010 , 04:19   Re: How to read some text from a web?
Reply With Quote #5

Quote:
Originally Posted by Exolent[jNr] View Post
What? That plugin basically reads files from the web and puts the data into a file on the server.
You can use that code as an example for reading files from the web.
Yes I understand that,but I don't want to save the file,I just want to read from a web,but,I is better if I use this way.Thanks Exolent^_^
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 11-02-2010 , 12:50   Re: How to read some text from a web?
Reply With Quote #6

Quote:
Originally Posted by #8 SickneSS View Post
Yes I understand that,but I don't want to save the file,I just want to read from a web,but,I is better if I use this way.Thanks Exolent^_^
You don't get it. You don't have to save to the file if you change the code to just store in a variable.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-02-2010 , 15:23   Re: [Solved]How to read some text from a web?
Reply With Quote #7

Can look at this too

http://forums.alliedmods.net/showpos...12&postcount=4
__________________
Bugsy is offline
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 11-02-2010 , 16:15   Re: [Solved]How to read some text from a web?
Reply With Quote #8

Sorry Exolent Im not very good in english,so I can't understand at all when you tell me something,sorry....Thanks Bugsy,but I'll use the way of Exolent,btw the include doesn't works for me

[Edit]

I don't understand why is not working,here is the code...
Code:
/*     Kz Records Script by #8 SickneSS         ~ Credits to ReymonARG// */ #include <amxmodx> #include <amxmisc> #include <httpdl> /* File */ new Path[256] new Indx /* Message */ new SayText public plugin_init() {     /* Plugin Registration */     register_plugin("Kz Records","0.0.1","#8 SickneSS")         /* Command */     register_clcmd("say /wr","cmdRecords",0,"- Show Kz World Records")         /* Message */     SayText = get_user_msgid("SayText") } public plugin_cfg() {     get_configsdir(Path,charsmax(Path))     formatex(Path,charsmax(Path),"%s/demos.txt",Path)            if(!file_exists(Path))         Indx = download("http://www.xtreme-jumps.eu/demos.txt",Path) } public cmdRecords(id) {        if(!file_exists(Path))     {         ChatColor(id,"!g[Next-Version] !yThe records file doesn't exists")         return PLUGIN_HANDLED     }         new f = fopen(Path,"rt")         new Data[150]     new Mapnm[64],Sec[10],MilS[10],Plyrname[32]         new bool:Found         new Mapname[64]     get_mapname(Mapname,charsmax(Mapname))         while(!feof(f))     {         fgets(f,Data,charsmax(Data))                 if(Data[0] == ';' || Data[0] == '/' && Data[1] == '/'         || containi(Data,"Xtreme-Jumps.eu") != -1         || containi(Data,"www.cosy-climbing.net") != -1         || containi(Data,"Kreedz-Arg.com.ar") != -1         || containi(Data,"nV-Arg.com.ar") != -1) continue;                 replace(Data,charsmax(Data),"."," ")                 parse(Data,Mapnm,charsmax(Mapnm),Sec,charsmax(Sec),MilS,charsmax(MilS),Plyrname,charsmax(Plyrname))                 if(equali(Mapname,Mapnm))         {             Found = true             ChatColor(id,"!g[Next-Version] !t%s !yWorld record is !t%02d:%02d.%s !yBy !g%s",Mapnm,(str_to_num(Sec)/60),(str_to_num(Sec)%60),MilS,Plyrname)         }     }         if(!Found)         ChatColor(id,"!g[Next-Version] !t%s !ydoesn't have an official record",Mapname)         return PLUGIN_HANDLED } public dlcomplete(id,file[])     log_amx("[AMXX] File id %d Downloaded to %s",Indx,Path) stock ChatColor(const id, const input[], any:...) {     new count = 1, players[32]     static msg[191]     vformat(msg, 190, input, 3)         replace_all(msg, 190, "!g", "^x04")     replace_all(msg, 190, "!y", "^x01")     replace_all(msg, 190, "!t", "^x03")         if(id)         players[0] = id     else     get_players(players, count, "ch")     {         for (new i = 0; i < count; i++)         {             if (is_user_connected(players[i]))             {                 message_begin(MSG_ONE_UNRELIABLE, SayText, _, players[i])                 write_byte(players[i]);                 write_string(msg);                 message_end();             }         }     }  }

Last edited by #8 SickneSS; 11-02-2010 at 17:22.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
Old 11-03-2010, 20:11
#8 SickneSS
This message has been deleted by #8 SickneSS.
Old 11-08-2010, 10:19
#8 SickneSS
This message has been deleted by YamiKaitou. Reason: bump
Reply



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 -4. The time now is 14:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode