Recent

Author Topic: Sending files with pascal  (Read 6185 times)

Peterkl

  • New Member
  • *
  • Posts: 22
Sending files with pascal
« on: October 15, 2015, 09:46:53 pm »
Greetings,

I'm going to start learning networking with pascal, but before getting on, I would like to know if actually it is possible to upload files (in .txt, .db, .jpg) to an online host server with one of the networking libraries and protocols of these libraries of pascal.

Thanks in advance ! :)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8747
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Sending files with pascal
« Reply #1 on: October 16, 2015, 03:21:35 am »
Learn first, ask later. Networking protocols are language neutral. If you can do in one language, you can do in any other as long as the language implementation can fulfill the protocol requirements. i.e. despite turing complete, the lack of binding to BSD socket libraries (or any own implementation) make it impossible to do it using Brainfuck.

fatlizard

  • Newbie
  • Posts: 1
Re: Sending files with pascal
« Reply #2 on: September 27, 2016, 08:33:31 pm »
God forbid anyone ask a simple, polite, simple question, as Leledumbo seems to do his best to sound the fountain of all knowledge, and, anyone else as a piece of dirt.

Quote
Learn first, ask later

Yes the last line of the signature is:
Quote
Code first, think later

My background?
Actually attending a conference where Philip Kahn (yes, the real man) did his usual saxophone performance, and Borland (the Company) handed out free boxes of software.
This was in a room of 00's, where only a handful had ventured into the world of Windows Programming, and DOS meant Disk Operating System, rather than Denial Of Service.

Delphi revolutionised with it's simplicity and IDE.
God, I prior I had to use a MS DOS IDE to compile a Windows program, then run it separately to see if it worked.

Borland, Delphi, opened my eyes to the possibilities, and I moved from my country to Asia, then USA to continue Delphi development.

Now, nearly 22 years later, Lazarus is doing it's best to keep Kahn's vision alive, whilst others seem to try and alien newcomers.

Having been programming for more years than you were born (I suspect), a little humbleness with go a long way - it got me three jobs in three other countries, along with my accumulated skills (before Windows I wrote a DOS undelete program, when, to the best of my knowledge, the only other two in existence were from Norton, and, McAfee)

Anyone here remember when we'd have to intercept Windows messages, say a mouse click, then break the event to first find out if was left button or right button?

I came here to consider resurrecting (no pun intended), an old Delphi commercial program, or re-write in PHP, either with a Framework such as CodeIgniter, or, do the whole thing from scratch, using as much of  the old Delphi logic as possible)

Browsing the forums, it seems a fantastic project, and I cannot compliment you high enough.
So many bright, clever, and sharing individuals.
Then there are these people ... the reason I gave up Corporate programming many years ago.

When you can snatch the pebble from my hand, only then do you get my respect Grasshopper
« Last Edit: September 27, 2016, 08:40:08 pm by fatlizard »

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Re: Sending files with pascal
« Reply #3 on: September 27, 2016, 09:13:42 pm »
When you read documentation these are basically one liners.
But: what protocol? FTP? HTTP? TELNET? Whatever.
They are all one liners provided you choose the correct library for your needs.

So: what do you want?
Specialize a type, not a var.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8747
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Sending files with pascal
« Reply #4 on: September 27, 2016, 09:22:12 pm »
@fatlizard, go back to your cave, please. You necrobump an old thread just to bash me on your first post. What an attitude for someone new to the forum...

On the answer to OP question: there are a lot of ways to upload files online, I will not say any specific way, that's not the way you learn. You search first, you learn it, you try it, you're stuck AND ONLY THEN you ask with SPECIFIC problem: what makes you stuck and what you have tried so far. Don't want to follow my way? Feel free, but I'm not gonna be your source of answer. My first signature line already points to an agreement of how a question should be asked in the forum. READ IT!!!

Edson

  • Hero Member
  • *****
  • Posts: 1301
Re: Sending files with pascal
« Reply #5 on: September 27, 2016, 10:05:06 pm »
I would like to know if actually it is possible to upload files (in .txt, .db, .jpg) to an online host server with one of the networking libraries and protocols of these libraries of pascal.
Yes, it's possible. It's a common task in these days. There are some libraries to do this with Free Pascal / Lazarus.

Learn first, ask later. Networking protocols are language neutral.
What a bad humor. Not all the people have all the knowledge.
« Last Edit: September 27, 2016, 10:07:27 pm by Edson »
Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

Leledumbo

  • Hero Member
  • *****
  • Posts: 8747
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Sending files with pascal
« Reply #6 on: September 27, 2016, 10:36:53 pm »
What a bad humor. Not all the people have all the knowledge.
Hence: LEARN. I think I should stop answering non-faq-entry-conforming questions, the tide of laziness is too damn high.

shobits1

  • Sr. Member
  • ****
  • Posts: 271
  • .
Re: Sending files with pascal
« Reply #7 on: September 28, 2016, 11:05:05 pm »
@Leledumbo: many people are just programing for fun not to make living out of it,, and they have other jobs so it less and less for them time to learn every aspect/theory whatever for every problem they face (the fact is they are not lazy).
so you could have proposed some teaching material for the OP and anyone that might find this thread useful.

eny

  • Hero Member
  • *****
  • Posts: 1634
Re: Sending files with pascal
« Reply #8 on: September 29, 2016, 12:23:43 am »
@Leledumbo: many people are just programing for fun not to make living out of it,, and they have other jobs so it less and less for them time to learn every aspect/theory whatever for every problem they face (the fact is they are not lazy).
so you could have proposed some teaching material for the OP and anyone that might find this thread useful.
That was not OP's question; the question was a simple yes/no question.
And since Peterki hasn't responded after almost a year it's safe to assume the question was answered.
As LLD pointed out, the kick after one year was completely unnecessary and off topic.
All posts based on: Win10 (Win64); Lazarus 2.0.10 'stable' (x64) unless specified otherwise...

shobits1

  • Sr. Member
  • ****
  • Posts: 271
  • .
Re: Sending files with pascal
« Reply #9 on: September 29, 2016, 12:44:27 am »
That was not OP's question; the question was a simple yes/no question.
And since Peterki hasn't responded after almost a year it's safe to assume the question was answered.
As LLD pointed out, the kick after one year was completely unnecessary and off topic.
What....??!!!!

I didn't look at the date all, you are right this was completely unnecessary and off topic.

... now I know what he meant by 'You necrobump an old thread'  :D

engkin

  • Hero Member
  • *****
  • Posts: 3112
Re: Sending files with pascal
« Reply #10 on: September 29, 2016, 01:20:44 am »
FOBAN & Fatlizard, welcome to the forum.

I have to say I agree with Fatlizard.

I disagree with both you and Fatlizard. Opening an old thread to write your first post (as Fatlizard did) is something frowned upon. Turning your very first post into an attack against a [senior] member is unacceptable and indicates that your account is created solely for this purpose.

Please refrain from writing in old threads. Use this forum to ask/answer questions related to Lazarus/FPC/Pascal.

 

TinyPortal © 2005-2018