Raised This Month: $ Target: $400
 0% 

[SMA] Get url Contained


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DeVe
Member
Join Date: Jul 2014
Old 07-17-2014 , 06:36   [SMA] Get url Contained
Reply With Quote #1

Hi Alliedmods team, Users

I know php lang but amxx will get me hard to complete some of my project.

I try to explain you whit my words and my idea .

#include <amxmodx>
#include <amxmisc>

new postCvar[64]
new const urlGET[ ] = "http://domain.ro/geturl.php?download="
new const geturl = urlGET + postCvar

public plugin_init()
{
register_plugin(PLUGIN_NAME, VERSION, AUTHOR)
postCvar = register_cvar("postcvar","1")
Verify_Cvar();
}
public Verify_Cvar()
{
if(geturl == 1)
{
console_print ("Cvarul inregistrat este valid);
}
else
{
console_print ("Cvar inregistrat nu este valid");
}
}

So here is my request to be make.

I want a plugin to auth whit my link.

Now first I want to register a cvar on amxx.cfg
Next I want this cvar to add whit new const urlGET[ ] = "http://domain.ro/geturl.php?download="

and I will get

http://domain.ro/geturl.php?download=cvar

If in amxx.cfg will put
postcvar "alliedmods"

the url will be http://domain.ro/geturl.php?download=alliedmods

Now When the urlGET + postcvar will get contained 1 will be TRUE if will be 0 will be FALSE !

Thank you and I hope you to understand.

I know only php and it`s new for me and I want to learn .
DeVe is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-17-2014 , 12:29   Re: [SMA] Get url Contained
Reply With Quote #2

Are you using it as an authentication to prevent users who have not purchased your plugin from using it?
__________________
Black Rose is offline
DeVe
Member
Join Date: Jul 2014
Old 07-17-2014 , 12:33   Re: [SMA] Get url Contained
Reply With Quote #3

No I do not use for user. I want to secure my plugin
DeVe is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-17-2014 , 13:28   Re: [SMA] Get url Contained
Reply With Quote #4

Don't share it: protected.
__________________
Black Rose is offline
DeVe
Member
Join Date: Jul 2014
Old 07-17-2014 , 13:53   Re: [SMA] Get url Contained
Reply With Quote #5

Black thanks but I do not need a advice .

I just open this Scripting help to learn and to make what I want

Thank you
DeVe is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-17-2014 , 15:27   Re: [SMA] Get url Contained
Reply With Quote #6

Okay. You can use the sockets module to send HTTP requests. There are some examples you can search for and 2 includes to ease the work.
In your situation it seems like SQL can do the work as well. You should look into that as it is generally more reliable.
__________________
Black Rose is offline
DeVe
Member
Join Date: Jul 2014
Old 07-17-2014 , 15:45   Re: [SMA] Get url Contained
Reply With Quote #7

I found for moment a good solution !

Thank you for guide me.

Regards,
Cristian G.

Last edited by DeVe; 07-17-2014 at 16:11.
DeVe is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-17-2014 , 16:14   Re: [SMA] Get url Contained
Reply With Quote #8

Just remember that the only reliable method to protect your plugin is to not give it to anyone.
__________________
fysiks is offline
DeVe
Member
Join Date: Jul 2014
Old 07-17-2014 , 17:31   Re: [SMA] Get url Contained
Reply With Quote #9

Ok I will remeber

If someone can help me I have some issues here

L 07/18/2014 - 00:23:16: Test: domain/geturl?download= postcvar

this is the log of my test.

I try to put domanin + geuturl= postcvar

The problemes is the space of geturl="HERE"postcvar

My test is:

#include <amxmodx>
#include <amxmisc>
#include <sockets>
new g_Socket,cvar,msg2[32];
public plugin_init( )
{
register_plugin(PLUGIN_NAME, VERSION, AUTHOR)
cvar= register_cvar("post_cvar","cvartest")
get_pcvar_string(CheckLicense,msg2,32)
SendRequest();
}
public SendRequest()
{
My code
}

How can I set geturl="HERE"postcvar do not be space into ="SPACE"

I thinks is here msg2[32];

Last edited by DeVe; 07-17-2014 at 17:33.
DeVe is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 07-17-2014 , 17:50   Re: [SMA] Get url Contained
Reply With Quote #10

What?
__________________
Black Rose is offline
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 13:13.


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