Raised This Month: $ Target: $400
 0% 

Open file with links to sockets


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CsIosefin
Senior Member
Join Date: Aug 2009
Old 06-19-2010 , 17:07   Open file with links to sockets
Reply With Quote #1

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));
}
CsIosefin is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-19-2010 , 17:34   Re: Open file with links to sockets
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=41913
__________________
Impossible is Nothing
Sylwester is offline
CsIosefin
Senior Member
Join Date: Aug 2009
Old 06-19-2010 , 18:31   Re: Open file with links to sockets
Reply With Quote #3

Sylwester: A question in the link site and directory can not make?
CsIosefin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-19-2010 , 18:35   Re: Open file with links to sockets
Reply With Quote #4

Quote:
Originally Posted by CsIosefin View Post
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.
__________________
fysiks is offline
CsIosefin
Senior Member
Join Date: Aug 2009
Old 06-19-2010 , 18:39   Re: Open file with links to sockets
Reply With Quote #5

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?
CsIosefin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-19-2010 , 18:44   Re: Open file with links to sockets
Reply With Quote #6

It's impossible to understand you. Maybe post in the mulitlingual forums in your native language.
__________________
fysiks is offline
CsIosefin
Senior Member
Join Date: Aug 2009
Old 06-19-2010 , 18:54   Re: Open file with links to sockets
Reply With Quote #7

Why do not you understand? Write in English, what you do not understand?
CsIosefin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 06-19-2010 , 19:30   Re: Open file with links to sockets
Reply With Quote #8

Quote:
Originally Posted by CsIosefin View Post
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)
__________________
fysiks is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-19-2010 , 19:13   Re: Open file with links to sockets
Reply With Quote #9

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));

__________________
Impossible is Nothing
Sylwester is offline
CsIosefin
Senior Member
Join Date: Aug 2009
Old 06-19-2010 , 19:22   Re: Open file with links to sockets
Reply With Quote #10

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
CsIosefin is offline
Reply


Thread Tools
Display Modes

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:57.


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