AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Open file with links to sockets (https://forums.alliedmods.net/showthread.php?t=130055)

CsIosefin 06-19-2010 17:07

Open file with links to sockets
 
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 ...
Code:

#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

Re: Open file with links to sockets
 
https://forums.alliedmods.net/showthread.php?t=41913

CsIosefin 06-19-2010 18:31

Re: Open file with links to sockets
 
Sylwester: A question in the link site and directory can not make?

fysiks 06-19-2010 18:35

Re: Open file with links to sockets
 
Quote:

Originally Posted by CsIosefin (Post 1213781)
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

Re: Open file with links to sockets
 
PHP Code:

#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(Host80SOCKET_TCPerr);
    
    new 
Player[512];
    
formatex(Playercharsmax(Player), "GET file.php HTTP/1.1^nHost: %s^n^n"site);
    
    
socket_send(SocketPlayercharsmax(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

Re: Open file with links to sockets
 
It's impossible to understand you. Maybe post in the mulitlingual forums in your native language.

CsIosefin 06-19-2010 18:54

Re: Open file with links to sockets
 
Why do not you understand? Write in English, what you do not understand?

Sylwester 06-19-2010 19:13

Re: Open file with links to sockets
 
try
PHP Code:

#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(Host80SOCKET_TCPerr);
    
    new 
Player[512];
    
formatex(Playercharsmax(Player), "GET /AM/file.php HTTP/1.1^nHost: %s^n^n"site);
    
    
socket_send(SocketPlayercharsmax(Player));



CsIosefin 06-19-2010 19:22

Re: Open file with links to sockets
 
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

Re: Open file with links to sockets
 
Quote:

Originally Posted by CsIosefin (Post 1213806)
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)


All times are GMT -4. The time now is 14:57.

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