2018-12-31 21:54:09

Hello.
I wanted to ask about how I make PHP create or edit a text document if I write stuff to it via in this case BGT's url_post function.
Thanks.

------
Post brought to you by me.

2019-01-01 01:05:13

You can't, due to two things:
* the documents size is limited based on web server and PHP configuration. I would not advise changing this to make it unlimited.
* You would be required to go over HTTP, which would mean anyone could see what your sending or downloading.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2019-01-02 02:07:41

You want to make it write text or files? Im not sure what you're trying to ask here...

Ivan

2019-01-03 01:37:42

I want it to write to a text file.

------
Post brought to you by me.

2019-01-03 02:35:48

@4, like I said, its kinda pointless, and very limited.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

2019-01-03 02:58:31

Ethin, if he was worried about people packet sniffing whatever he’s sending he could just encrypt whatever’s on the website and have the client decrypt it when it’s needed. Not that hard.

2019-01-03 20:19:38 (edited by Ethin 2019-01-03 20:23:31)

@6, And I have shown that, time and time again, BGT's encryption is incredibly easy to break, owing to the poor way it manages memory. You have to do very weird hacks to get it to the point where its as good as OpenSSL would be, for example. And your forgetting that, while the BGT string_encrypt() function says it uses the "AES-Rijndel 256-bit encryption algorithm," it does not specify what mode it uses. So we don't know if it uses CBC, GCM, and so on. So getting PHP strings to be decryptable by BGT, and vice-versa, would be difficult because he'd need to try every single mode, and encryption is a tricky business anyway. Add to that the fact that AES is slow in software if you don't have AES-NI support in your processor, and that AES is very hard to implement correctly and securely, and you've got a disaster just waiting to happen. We don't even know if BGT has a custom-made AES encryption algorithm implementation or whether it uses a trusted AES encryption algorithm that has been shown to be securely implemented. If it does in fact use a custom algorithm, then I doubt PHP would be able to decrypt it, especially if that custom algorithm adds extra padding and all that, which may or may not compromise the security of the algorithm. PHP uses OpenSSL (or an equivalent) for its cryptography needs. We don't know what BGT uses.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up +1

2019-01-04 01:58:00

Well i guess some encryption is better than no encryption if you’re going the bgt way.

2019-01-04 02:02:09

And yeah i get your point about it not always working thanks to encryption being a bitch, but i guess just don’t try sending important data like that.

2019-01-06 03:55:32

Hello.
Encryption is not really what I am concerned about, this information I will be posting with the script I am making is public anyway, I want to be able to edit some text without actually going into my website with FTP, deleting the file or just overriding it and all that.
Thanks.

------
Post brought to you by me.

2019-01-06 04:57:29

@patrickthepatshit, you'll need to download, modify, then reupload. And like I said, your restricted by web server and PHP configuration limitations. This idea is not the best one; you might as well do some kind of server implementation.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up