write to a file on another server
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

write to a file on another server

Started by Exile, 08 February, 2005, 22:44:07

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Exile

i have written a script that displays information about my hub radio stream ona timer...I wanted to be able to write to the configuration file on the server, from the gui that I have programmed to write to the file, I can write to the file locally, but I don't know how to write to a file over the internet... is this possible

-- Hub Radio Advert Script by Exile
-- Sends a PM to users to display the hub radio link...

assert(dofile("Nu-Grime Settings.ini"),"Nu-GrimeSettings.ini not found, check your ptokax path")

function Main()
frmHub:RegBot(bot)
SetTimer(Mins*60000) 
end 

function DataArrival(user, data)
s,e,cmd = strfind(data, "%b<>%s+(%S+)(%S+)")
if (cmd==Prefix..Start) and user.bOperator then
StartTimer()
OnTimer() 
return 1
elseif (cmd==Prefix..Stop) and user.bOperator then
StopTimer()
Stopped()
return 1
end
end
function OnTimer() 
SendToAll(BotName,"\r\n\r\n*** "..DjName.." is now Streaming Live Radio on "..StationName.." ***\r\n*** "..RadioStream.." ***\r\n*** "..RadioStream.." ***\r\n*** "..RadioStream.." ***\r\n*** "..DjName.." is now Streaming Live Radio on "..StationName.." ***\r\n")
end 
function Stopped()
SendToAll(BotName,"\r\n\r\n*** Hub Radio has now Stopped Streaming, Thankyou for listening :D ***\r\n")
end

Truly Exile,

Tw?sT?d-d?v

Hi ,  

Let me get this right,you wanna send your hub stats over the internet.....I ask why??


isnt it just the same as sending it out in pm ....as users will not still see it over the internet ,unless they are browsing that web page ......    

Or am i getting the wrong idea here....

Exile

I have a GUI and a script, which together display a message about the hub radio...in the hub

i need to be able to change variables which are saved in a config file on the hub server...and I dont know how

plop

upload the changed config by ftp 2 the remote server.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Exile

this seems a bit long to do, is it not possible to just write to the file through the hub
like the way we add things to a release bot?

plop

#5
QuoteOriginally posted by Exile
this seems a bit long to do, is it not possible to just write to the file through the hub
like the way we add things to a release bot?
how would the gui do this?
it would only be possible if the gui connects 2 the hub.
if not, using ftp is much easier 2 implement then making it connect 2 the hub.
or you would have 2 send the config 2 the hub yourself, so in my eyes using ftp is much nicer.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Exile

I will need to know how to make the LUA script read from a FTP site then, right? I can program the GUI easily...that's not a problem, It's just the LUa side that I'm going to struggle with. I've never connected to FTP through LUA before, any help?

bastya_elvtars

Everything could have been anything else and it would have just as much meaning.

plop

QuoteOriginally posted by Exile
I will need to know how to make the LUA script read from a FTP site then, right? I can program the GUI easily...that's not a problem, It's just the LUa side that I'm going to struggle with. I've never connected to FTP through LUA before, any help?
make the gui upload it, the hub freezes during the transfer if you have a lua script doing it.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Exile

Ive managed to program my own GUI for the script I mentioned. It works fine, I'll post a few pictures later, lookssweet :D

SMF spam blocked by CleanTalk