Raised This Month: $32 Target: $400
 8% 

Showing results 1 to 25 of 44
Search took 0.01 seconds.
Search: Posts Made By: Kapuzzino
Forum: Scripting Help 02-05-2014, 15:24
Replies: 8
Views: 981
Posted By Kapuzzino
Re: How to get rid of lines before and after str?

php code:

$fgc = file_get_contents("http://www.fcdynamo.kiev.ua");

// echo $fgc;

preg_match_all("/id=\"tab3-1\".*active.*<td>(\d)<\/td>.*(Динамо).*<\/td>/Uis",$fgc,$matches);

/*echo...
Forum: Scripting Help 02-05-2014, 15:05
Replies: 8
Views: 981
Posted By Kapuzzino
Re: How to get rid of lines before and after str?

this HTML staffs cause I'm using free-webhosting, I can't avoid them, but they're definitily in static, so I can do like I did.

@fysiks

I'm not sure what thread you mean.
Forum: Scripting Help 02-05-2014, 14:46
Replies: 10
Views: 1,780
Posted By Kapuzzino
Re: How to get a whole page through the sockets?

I did next:

#include <amxmodx>
#include <sockets>
#include <string>

#define PLUGIN "[FCC] Football Club Control"
#define AUTHOR "Kapu"
#define VERSION "1.0"
Forum: Scripting Help 02-05-2014, 14:41
Replies: 8
Views: 981
Posted By Kapuzzino
Forum: Scripting Help 02-05-2014, 14:35
Replies: 8
Views: 981
Posted By Kapuzzino
Re: How to get rid of lines before and after str?

@fysiks I did this:

new arg1[128];
new arg2[128];
new arg3[128];
new arg4[128];
new arg5[128];
new arg6[128];
new arg7[128];
new arg8[128];
Forum: Scripting Help 02-05-2014, 09:40
Replies: 8
Views: 981
Posted By Kapuzzino
How to get rid of lines before and after str?

For example:

n: close
Content-Type: text/html

The string what I need
<!-- Hosting24 Analytics Code
And I want to get only the string what I need
Forum: Scripting Help 02-04-2014, 13:15
Replies: 23
Views: 4,161
Posted By Kapuzzino
Re: How to read a file into a variable?

@ConnorMcLeod yeas, looks like I catched XY problems (http://mywiki.wooledge.org/XyProblem)
Forum: Scripting Help 02-04-2014, 13:12
Replies: 23
Views: 4,161
Posted By Kapuzzino
Re: How to read a file into a variable?

Yes, I'm thinking about all of that. So the site is the site of the club. And I think I will use a webhosting than, so will something like this:

-> user says in a console /dinamo-position
-> AMX...
Forum: Scripting Help 02-03-2014, 16:56
Replies: 23
Views: 4,161
Posted By Kapuzzino
Re: How to read a file into a variable?

The main idea.



btw about an amx modx->php->amx modx->counter strike way, I'm using localhost and if it's will be a module, that can use other people than it's will not work, because not all...
Forum: Scripting Help 02-03-2014, 14:43
Replies: 23
Views: 4,161
Posted By Kapuzzino
Re: How to read a file into a variable?

I don't think it's will be a huge files (info, not a files). Though limit is also good.
Forum: Scripting Help 02-03-2014, 14:05
Replies: 23
Views: 4,161
Posted By Kapuzzino
Re: How to read a file into a variable?

maybe it will be so, but now would be cool to find a way on how to put this web into variable instead of file, I hope all understands why.
Forum: Scripting Help 02-03-2014, 12:31
Replies: 23
Views: 4,161
Posted By Kapuzzino
Re: How to read a file into a variable?

everything can be with this parsing, don't look at the size of array, it's not the main trouble of this thread.
Forum: Scripting Help 02-03-2014, 11:50
Replies: 23
Views: 4,161
Posted By Kapuzzino
Re: How to read a file into a variable?

in test.txt is web page, and I didn't know a size. The size can be different.

now it contains html:


HTTP/1.1 200 OK

Server: nginx/1.4.1

Date: Mon, 03 Feb 2014 15:55:12 GMT
Forum: Scripting Help 02-03-2014, 11:41
Replies: 23
Views: 4,161
Posted By Kapuzzino
Re: How to read a file into a variable?

@fysiks what about

LoadFileForMe("addons/amxmodx/configs/test.txt",html,charsmax(html),trash);
server_print("%s",html);

though I'm getting nothing yet.
Forum: Scripting Help 02-03-2014, 11:31
Replies: 23
Views: 4,161
Posted By Kapuzzino
Re: How to read a file into a variable?

I have the error on this line:

new size = file_size("addons/amxmodx/configs/test.txt",1);

error:

Error: Must be a constant expression; assumed zero on line 24
Forum: Scripting Help 02-03-2014, 11:15
Replies: 10
Views: 1,780
Posted By Kapuzzino
Re: How to get a whole page through the sockets?

now I'm using

write_file("addons/amxmodx/configs/test.txt",g_Data)

but putting all data in a variable must be a good case anyway.
Forum: Scripting Help 02-03-2014, 11:10
Replies: 23
Views: 4,161
Posted By Kapuzzino
How to read a file into a variable?

in a server console is nothing.
// global
new trash;
new html[3000000];

if (file_exists("addons/amxmodx/configs/test.txt"))
{
...
Forum: Scripting Help 02-03-2014, 10:16
Replies: 10
Views: 1,780
Posted By Kapuzzino
Re: How to get a whole page through the sockets?

here is my code again, and I'm impressed that the strcat is not working absolutely:

#include <amxmodx>
#include <sockets>

#define PLUGIN "[http://amxxmodx.ru] lesson about sockets"...
Forum: Scripting Help 02-02-2014, 16:14
Replies: 27
Views: 4,097
Posted By Kapuzzino
Re: How to concat a strings?

My general question is to get a web-page into a string and parse some tags with regular expressions. As for this thread, I think it's solved.
Forum: Scripting Help 02-02-2014, 16:08
Replies: 27
Views: 4,097
Posted By Kapuzzino
Re: How to concat a strings?

// Defines new variable.
new Destination[512];

@fysiks in this case.
Forum: Scripting Help 02-02-2014, 11:42
Replies: 4
Views: 713
Posted By Kapuzzino
Re: Regex issue, how to get the both numbers from the line?

yes, thats working, I hope I'll found out how to parse whole html page as well.

p.s. if I get it.
Forum: Scripting Help 02-02-2014, 11:08
Replies: 4
Views: 713
Posted By Kapuzzino
Re: Regex issue, how to get the both numbers from the line?

I think that is must be so, the first match is always must contain whole matches.

any example in a loop for that?



Maybe it depends of other functions in regex lib, like regex_match_c or...
Forum: Code Snippets/Tutorials 02-02-2014, 10:38
Replies: 43
Views: 22,587
Posted By Kapuzzino
Re: [INC] HTTP2

Anyway there is nothing out.

#include <amxmodx>
#include <http2>

#define PLUGIN "http2 test"
#define AUTHOR "Admin"
#define VERSION "1.0"

new data[HTTP2_BUFFER_SIZE];
Forum: Scripting Help 02-02-2014, 09:34
Replies: 6
Views: 1,083
Posted By Kapuzzino
Forum: Scripting Help 02-02-2014, 09:28
Replies: 27
Views: 4,097
Posted By Kapuzzino
Re: How to concat a strings?

Well, I guess I figured out how to concat a two strings:

new s1[] = "This is "
new s2[] = "just a test"
strcat(s1,s2,128)
server_print(s1)

but the last argument it's a maxlength of...
Showing results 1 to 25 of 44

 
Forum Jump

All times are GMT -4. The time now is 23:08.


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