Search:

Type: Posts; User: daza166

Search: Search took 0.02 seconds.

  1. Replies
    2
    Views
    3,164

    c programming http get request

    Hello,
    I am trying to work out how to write a web server program that will serve a single file via a HTTP GET request if the file exists otherwise give the user a 404 error.

    I have started by...
  2. Replies
    6
    Views
    1,211

    Thanks for reply guys, So what would be the best...

    Thanks for reply guys,
    So what would be the best way to go, as I can not visually see numbers so how do I know if the program is copying files correctly? delimiters may be the way to go, but I still...
  3. Replies
    6
    Views
    1,211

    C programming reading/writting query

    Hello guys,

    Just got a question regarding my program which user inputs a file and I read content inside and create exact copy of file, with the same name.

    I have got it working fine for...
  4. Replies
    24
    Views
    6,973

    itme86, Say I want to write() 4 bytes(int) to...

    itme86,

    Say I want to write() 4 bytes(int) to a file and read() that 4 bytes back out and put the value into inside those 4 bytes into a variable




    //open () .........opens approp files
    ...
  5. Replies
    24
    Views
    6,973

    itme86, ok managed to sort program myself,...

    itme86,

    ok managed to sort program myself, just stuck on little issue

    ) How do I write a variable into a file using write() function, it returns an error

    say I want to write() an integer...
  6. Replies
    24
    Views
    6,973

    looked in ghex but could not work out, what it...

    looked in ghex but could not work out, what it means, here is bit of first line is like

    00000000 69 6E
    00000011 61 72
    00000022 73 74

    nothing on the clear text on side, just content can...
  7. Replies
    24
    Views
    6,973

    itme86, the problems is when I say add one...

    itme86,

    the problems is when I say add one file
    read(fdin, (short*)&numfiles, sizeof(short));

    and then
    printf("%d\n", numfiles); -- returns 28265 , should that not be '1' as only 1 file...
  8. Replies
    24
    Views
    6,973

    itme86, hello again, just encountered a error...

    itme86,

    hello again, just encountered a error I am stuck on: -

    --) When adding files to archive ( the first program), when we go back to write() the header data, we reserved 2 bytes(short) at...
  9. Replies
    24
    Views
    6,973

    itsme86 ok, so they are two programs. With...

    itsme86

    ok, so they are two programs. With the extract program would it not be easier to just extract all files, instead of one?

    The first two bytes of the archive file, would be int like 13,...
  10. Replies
    24
    Views
    6,973

    itsme86, just a little bit confused with...

    itsme86,

    just a little bit confused with extract code you provided, perhaps comments?.

    Is it using structure data from when files are read in? The problem is that when user runs extract...
  11. Replies
    24
    Views
    6,973

    Thanks itsme86, Thanks that really helped...

    Thanks itsme86,

    Thanks that really helped me!!! I have now successfully got the program taking user input of files to add, got some error checking on them and using read() write() adding them into...
  12. Replies
    24
    Views
    6,973

    Hello itsme86, Thanks for that useful info....

    Hello itsme86,

    Thanks for that useful info. To sum up everything down you have told me so far:

    1) I have changed ' write_to=write(archiv, buffer, file1_status); ' - so only writing into the...
  13. Replies
    24
    Views
    6,973

    Thanks for quick replies guys. You have given me...

    Thanks for quick replies guys. You have given me few ideas, if I use a header file would it probably be better to have it in a separate file to the actual output file?

    To give you better idea of...
  14. Replies
    24
    Views
    6,973

    C reading/writing files

    Hello,

    I am stuck on my C program which allows users to add files into an output (archive) file and also extract them all back out, ie so user can back up files on his system.

    My program has...
Results 1 to 14 of 15