PDA

View Full Version : Open file with links to sockets


CsIosefin
06-19-2010, 17:07
I want to open up the path past the site and the link to open file.php? Simple, but how good you? I could not in any way ...
#include <amxmodx>
#include <sockets>

new const site[] = "www.site.com"

new err;

public plugin_init()
{
register_plugin("SocketsPlugins", "1.0", "Team");
}

public Jucator()
{
new Socket = socket_open(Host, 80, SOCKET_TCP, err);

new Player[512];
formatex(Player, charsmax(Player), "GET: file.php HTTP/1.1^r^nHost:%s^r^nConnection: close^r^n^r^n", site);

socket_send(Socket, Player, charsmax(Player));
}

Sylwester
06-19-2010, 17:34
https://forums.alliedmods.net/showthread.php?t=41913

CsIosefin
06-19-2010, 18:31
Sylwester: A question in the link site and directory can not make?

fysiks
06-19-2010, 18:35
Sylwester: A question in the link site and directory can not make?

You make no sense. Find someone to translate for you because you can't speak english.

CsIosefin
06-19-2010, 18:39
#include <amxmodx>
#include <sockets>

new const site[] = "www.site.com/AM"

new err;

public plugin_init()
{
register_plugin("SocketsPlugins", "1.0", "Team");
}

public Jucator()
{
new Socket = socket_open(Host, 80, SOCKET_TCP, err);

new Player[512];
formatex(Player, charsmax(Player), "GET file.php HTTP/1.1^nHost: %s^n^n", site);

socket_send(Socket, Player, charsmax(Player));
}
I understand what mia said, now know how to do with GET, but I wonder, going to do that with a link directory? Or should I create a new part for directory? I'll take the mean of the directory file file.php, is this possible?

fysiks
06-19-2010, 18:44
It's impossible to understand you. Maybe post in the mulitlingual forums in your native language.

CsIosefin
06-19-2010, 18:54
Why do not you understand? Write in English, what you do not understand?

Sylwester
06-19-2010, 19:13
try

#include <amxmodx>
#include <sockets>

new const site[] = "www.site.com"

new err;

public plugin_init()
{
register_plugin("SocketsPlugins", "1.0", "Team");
}

public Jucator()
{
new Socket = socket_open(Host, 80, SOCKET_TCP, err);

new Player[512];
formatex(Player, charsmax(Player), "GET /AM/file.php HTTP/1.1^nHost: %s^n^n", site);

socket_send(Socket, Player, charsmax(Player));
}

CsIosefin
06-19-2010, 19:22
I think it is possible to put up near the link, so I did and I realize that going, but I thought going up. There is no problem, well it works somehow. Thanks very much to help Mr. Sylwester

fysiks
06-19-2010, 19:30
Why do not you understand? Write in English, what you do not understand?

You use english words but you were not speaking the english language. I'm amazed that Sylwester understood anything you said. (but of course he could just look in the code for errors)