Thread: FTP Library

  1. #1
    Registered User
    Join Date
    Mar 2017
    Posts
    9

    FTP Library

    Hello, I already post this question but i don't have any answer.

    I look at how to connect at a FTP Server and compare if this file name for example "OK" or not.

    Thanks for your time

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,532
    If you keep asking and get no replies, perhaps you need to ask a better question.
    How To Ask Questions The Smart Way

    For example,
    Which OS are you using?
    Which compiler are you using?
    Are you using an FTP library such as libcurl or are you rolling your own code using sockets?

    > and compare if this file name for example "OK" or not.
    What does this even mean?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Mar 2017
    Posts
    9
    Hello,
    Sorry for my English,


    So I explain the purpose of our program:


    Compiler: DEV C ++ or codeblocks
    OS: Using on a Windows 7 but compiling on Windows 10


    Details:


    Start -> Log in every 30 minutes on the ftp -> if on, then execute this command "shutdown -s 30 (for example)"; if not, then do nothing

    As u can see, normally we don't need library's


    Thanks a lot for your help

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,532
    > if on, then execute this command "shutdown -s 30 (for example)";
    FTP stands for File Transfer Prototcol. It transfers files between to machines.

    If you want to issue commands to a remote shell, you need something else.

    By "on", I assume you mean the remote machine is up, and is able to accept network connections.

    Rebooting the remote machine every 30 minutes seems like a DoS attack to me.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Mar 2017
    Posts
    9
    hello

    no, it's not a DDOS hack it's because we can' stay always connected on the ftp, and
    i forget to tell this :
    Start -> Log in every 30 minutes on the ftp -> Check if there is marked on in the file.txt --> if on, then execute this command "shutdown -s 30 (for example)"; if not, then do nothing

    thanks

  6. #6
    Registered User
    Join Date
    Mar 2017
    Posts
    9
    Do you want a drawing ? Because, with my english, it's hard to explain to u...
    Sorry about that

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,532
    Well you can script the command line FTP program to fetch a given file for you.
    Microsoft Windows Command-Line FTP Command List

    You can then examine the file locally to see if it contains your "on marker" is present.

    How you then "shutdown -s 30" on any machine (other than the one you're on) is anyone's guess. Perhaps some remote admin capability (I'm not a windows user if I can avoid it).
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    Registered User
    Join Date
    Mar 2017
    Posts
    9
    But I am "noob" in prog c or c++. Can you help me about the code ? Because i want a executable application, and i don't know where to start with my code...

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,532
    I suggest you start learning some basic programming skills then.

    Because in your current state of noob-ness, your contribution in "Can you help me about the code ?" is basically going to be zero, and someone else (not me) is going to wind up doing all the work.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  10. #10
    Registered User
    Join Date
    Mar 2017
    Posts
    9
    No i don't say this... Just help how can I use "Microsoft Windows Command-Line FTP" in my code

  11. #11
    Registered User
    Join Date
    Mar 2017
    Posts
    9
    Up ! please

  12. #12
    Registered User
    Join Date
    Mar 2017
    Posts
    9
    Need help please....

    Just how I can use the fp libary..
    Thanks a lot
    Best regards

  13. #13
    Registered User
    Join Date
    May 2009
    Posts
    3,688
    C Tutorial - Learn C - Cprogramming.com

    You have yet to ask a question that makes sense to me.

    I suggest you find a programming site in your native language or at least one you know better than English.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  14. #14
    CIS and business major
    Join Date
    Aug 2002
    Posts
    287
    Quote Originally Posted by WaBFall View Post
    Need help please....

    Just how I can use the fp libary..
    Thanks a lot
    Best regards
    Try libcurl. https://curl.haxx.se/libcurl/

    If you're a newbie to c, why not try Python programming instead. There are many Internet networking books on python. Using ftp libraries in c seems tedious if you're trying to perform small tasks.

  15. #15
    Registered User
    Join Date
    Mar 2017
    Posts
    9
    Ok Thanks, i gonna try this !

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Item Library(business library)
    By LísiasDeCastro in forum C Programming
    Replies: 6
    Last Post: 06-08-2015, 04:53 AM
  2. Library Symbol (String library)
    By LísiasDeCastro in forum C Programming
    Replies: 0
    Last Post: 06-06-2015, 01:35 PM
  3. Replies: 9
    Last Post: 02-08-2012, 10:23 PM
  4. Static library vs Dynamic library
    By Alegomaster in forum C Programming
    Replies: 5
    Last Post: 03-17-2011, 07:26 PM
  5. Replies: 19
    Last Post: 01-12-2006, 11:04 AM

Tags for this Thread