file-writing

Using PHP to store results of a post request

Im currently working with an API which requires we send our collection details in xml to their server using a post request. Nothing major there but its not working, so I want to output the sent xml to a txt file so I can look at actually whats being sent!! Instead of posting to the API im posting to a document called target, but the x...

I need to save a String to a text file using Java

I am a beginner Java programmer. I am attempting to make a simple text editor. I have got the text from the text field into a variable that's a String, called "text". My question is, how can I save the contents of the "text" variable to a text file? Thank you! ...

Java - writeLong method of DataOutputStream and writing hex

Currently, I have: outByte.writeInt(0x49492a00); outByte.writeInt(0x08000000); But i want to be able to write all of that on the same line. But: outByte.writeLong(0x49492a0008000000) is underlined red in Eclipse, and therefore incorrect. Is it possible to write those two lines all in one with writeLong()? ...

need help regarding a packet capture program

Hi all , The following is a program that captures TCP packets < port 80 > and prints header related information in the console for every packet. I have also included a timer , so that after every 1000 millisec i.e. 1 sec , the frequency of occurence of various flags , and distinct number of Src IPs , Ack nos and Seq nos encountered are...

C++ ofstream cannot write to file....

Hey I am trying to write some numbers to a file, but when I open the file it is empty. Can you help me out here? Thanks. /** main function **/ int main(){ /** variables **/ RandGen* random_generator = new RandGen; int random_numbers; string file_name; /** ask user for quantity of random number to produce **/ ...

Write DB information to a file - good appraoch?

Hello, I have a DB and a mapping framework which was written by the company Im working for. So I have a class for each table in the DB and those classes allow to call the DB and get various information in DataSets or DataTables for example. Now I am supposed to write that information to a TXT file in a certain format (I have the specs ho...

Objective C write to Remote URL

Ok, so I have the correct username / pass for a remote host, and I have a NSURL Object referring to the file on the server. How can I possibly write data to that server via Objective-C? I cannot find anyone with this problem, so you help would be greatly appreciated! ...