Raised This Month: $51 Target: $400
 12% 

[EXTENSION] cURL & Hash


Post New Thread Reply   
 
Thread Tools Display Modes
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-12-2016 , 18:50   Re: [EXTENSION] cURL & Hash
Reply With Quote #171

You aren't compiling/linking smsdk_ext.cpp.
__________________
asherkin is offline
Disowned
Member
Join Date: Oct 2015
Old 02-12-2016 , 23:00   Re: [EXTENSION] cURL & Hash
Reply With Quote #172

Quote:
Originally Posted by asherkin View Post
You aren't compiling/linking smsdk_ext.cpp.
smsdk_config.h, smsdk_ext.cpp, smsdk_ext.h are moved to the 'sdk' folder within the project, which should be linked with

PHP Code:
METAMOD = $(MMSOURCE17)/core-legacy

INCLUDE += -I. -I.. -Isdk -I../ \
    -
I$(METAMOD)/sourcehook -I$(SMSDK)/public -I$(SMSDK)/public/extensions \
    -
I$(SMSDK)/public/sourcepawn \
    -
I/opt/Source/lib/openssl/include \ 
The project is located under /home/user/sourcemod-curl-extension

Last edited by Disowned; 02-12-2016 at 23:02.
Disowned is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-13-2016 , 06:01   Re: [EXTENSION] cURL & Hash
Reply With Quote #173

1. You shouldn't be using core-legacy.
2. That's just adding it to the include path.
__________________
asherkin is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 03-05-2016 , 08:45   Re: [EXTENSION] cURL & Hash
Reply With Quote #174

Can somebody help me with custom quotes? I can't get it work.

PHP Code:
        new Handle:hndl curl_slist();

        
curl_slist_append(hndlbuffer);
        
//curl_slist_append(hndl, "rm test.txt"); 
        //curl_slist_append(hndl, "dele test.txt"); 
        //curl_slist_append(hndl, "DELETE test.txt"); 
        //curl_slist_append(hndl, "DELE test.txt"); 

        
curl_easy_setopt_handle(curlCURLOPT_QUOTEhndl); 
I have no idea why, but sm version always returns CURLE_QUOTE_ERROR, though authorization goes well and the file is in the LIST response. Does it mean that this version doesn't support custom quotes? I'v tested it with both my ftp and sftp servers. And the recent (*.exe) version works fine.

Last edited by kadet.89; 03-05-2016 at 14:16.
kadet.89 is offline
Send a message via Skype™ to kadet.89
SmackDaddy
Veteran Member
Join Date: Oct 2009
Old 03-25-2016 , 17:39   Re: [EXTENSION] cURL & Hash
Reply With Quote #175

Windows server with Curl 1.3, my logs show:

Quote:
L 03/25/2016 - 163:23: [SM] Unable to load extension "curl.ext": The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
Not sure when it started but can anyone assist in pointing me to a fix? Thank you in advance.
SmackDaddy is offline
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Location: ☠☠☠
Old 04-03-2016 , 19:16   Re: [EXTENSION] cURL & Hash
Reply With Quote #176

Could someone post an example of sending a string of text to a server using POST?

Or should I use a newer extension?

Last edited by ReFlexPoison; 04-03-2016 at 19:20.
ReFlexPoison is offline
sheo
SourceMod Donor
Join Date: Jul 2013
Location: Russia, Moscow
Old 04-05-2016 , 17:09   Re: [EXTENSION] cURL & Hash
Reply With Quote #177

PHP Code:
new CURL_Default_opt[][2] = {
  {
_:CURLOPT_NOSIGNAL,1},
  {
_:CURLOPT_NOPROGRESS,1},
  {
_:CURLOPT_TIMEOUT,10},
  {
_:CURLOPT_CONNECTTIMEOUT,10},
  {
_:CURLOPT_VERBOSE,0}
};

#define CURL_DEFAULT_OPT(%1) curl_easy_setopt_int_array(%1, CURL_Default_opt, sizeof(CURL_Default_opt))


public SomeFunction()
{
    new 
Handle:curl curl_easy_init();
    if (
curl != INVALID_HANDLE)
    {
        
CURL_DEFAULT_OPT(curl);
        new 
Handle:postreq_form curl_httppost();
        
curl_formadd(postreq_formCURLFORM_COPYNAME"steamid"CURLFORM_COPYCONTENTS"STEAM_0:1:11111111"CURLFORM_END);
        
curl_formadd(postreq_formCURLFORM_COPYNAME"ipaddr"CURLFORM_COPYCONTENTS"1.2.3.4"CURLFORM_END);
        
curl_formadd(postreq_formCURLFORM_COPYNAME"key"CURLFORM_COPYCONTENTS"5kj43n5k34jn543jn5"CURLFORM_END);
        
curl_easy_setopt_string(curlCURLOPT_URL"http://9.9.9.9/api/logconnect.php");
        
curl_easy_setopt_handle(curlCURLOPT_HTTPPOSTpostreq_form);
        
curl_easy_setopt_function(curlCURLOPT_WRITEFUNCTIONReturnedTextData0);
        
curl_easy_perform_thread(curlonRequestCompletepostreq_form);
    }
}

public 
ReturnedTextData(Handle:hndl, const String:buffer[], const bytes, const nmembany:userid)
{
}

public 
onRequestComplete(Handle:hndlCURLcode:codeany:postreq_form)
{
    
CloseHandle(postreq_form);
    
CloseHandle(hndl);

__________________
sheo is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 04-24-2016 , 22:43   Re: [EXTENSION] cURL & Hash
Reply With Quote #178

Quote:
Originally Posted by SmackDaddy View Post
Windows server with Curl 1.3, my logs show:



Not sure when it started but can anyone assist in pointing me to a fix? Thank you in advance.
i'm guessing you are on windows so

Quote:
Originally Posted by raydan View Post

the windows version should install the following package (thanks Thrawn2 to figure out)
Microsoft Visual C++ 2005 Service Pack 1 Redistributable Package MFC Security Update
http://www.microsoft.com/download/en....aspx?id=26347

hope this helps
__________________
8guawong is offline
Chaya_
BANNED
Join Date: Jul 2014
Location: Germany
Old 06-05-2016 , 17:50   Re: [EXTENSION] cURL & Hash
Reply With Quote #179

Outdated, need an update for debian and ubuntu.. alternate ?
Chaya_ is offline
Send a message via ICQ to Chaya_ Send a message via Skype™ to Chaya_
TheSpartaPT
New Member
Join Date: Sep 2015
Location: Leiria, Portugal
Old 06-30-2016 , 08:54   Re: [EXTENSION] cURL & Hash
Reply With Quote #180

L 06/30/2016 - 13:45:46: [SM] Unable to load extension "curl.ext": /home/sv_go_comp2/service8/csgo/addons/sourcemod/extensions/curl.ext.so: undefined symbol: _ZNSs9_M_mutateEjjj

how do i solve this ? :/

i have the cURL 1.3.0.0 linux version

Last edited by TheSpartaPT; 06-30-2016 at 08:55.
TheSpartaPT 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 18:51.


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