Jump to content

Recommended Posts

Posted (edited)

Hi all,

I got a question about sending image files though TCP/UDP protocol

I know how to send just text and stuff , but what do you think , is it possible to open a .jpg file for example , read all the code and send the code through TCP/UDP and then on the other side of the net save it back to .jpg ?

Thanks in advance B)

(sorry for placign in the wrong category)

Edited by pipobona
Posted

try read your file into a variable like

$handle= fileopen("fichier")

$fileread = fileread("fichier",0)

$filebinary _stringtohex($fileread)

after you make $filetowrite = _hextostring($filebinary)

filewrite($filetowrite)

when you read a file to a variable it keep the special caractere but you can print out! it why you have to convert to hex if you wanna print it ou send it.

if the file is to big make same but line by line

i do this to include binary file in script under format of txt file it better than a file install. because you can edut the file before install it! anyway it another story hehe!

GreenseedMCSE+I, CCNA, A+Canada, QuebecMake Love Around You.

Posted

I forgot i you try it. Make your transfer of file over a TCP connection!

because UDP connection are less error correction and checking!

for file transfer you need TCP always!

GreenseedMCSE+I, CCNA, A+Canada, QuebecMake Love Around You.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...