Getting values from post
Posted: Fri Nov 26, 2010 2:08 am
Hi
I am working on a new project, I have not been working with PHP for very long, and basically what is happening is this.
A server is sending strings to my server on a specific port. I am using fsockopen to listen on that port.
What I am struggling with is that they send information to me like this
NMmike|SNjones|BD19820115|CNfrance|LNenglish
I am using
$inputArray = explode("|",$input);
to store each string in a variable using "|" as the delimeter, which works well. The string all have different prefixes which describe the rest of the string, like NM is Name so they send NMmike, telling me the Name is mike. Does anyone know an efficient method to perhaps read the first two characters of a string and then remove them without knowing the actual length of the string?
Any help would be great
I am working on a new project, I have not been working with PHP for very long, and basically what is happening is this.
A server is sending strings to my server on a specific port. I am using fsockopen to listen on that port.
What I am struggling with is that they send information to me like this
NMmike|SNjones|BD19820115|CNfrance|LNenglish
I am using
$inputArray = explode("|",$input);
to store each string in a variable using "|" as the delimeter, which works well. The string all have different prefixes which describe the rest of the string, like NM is Name so they send NMmike, telling me the Name is mike. Does anyone know an efficient method to perhaps read the first two characters of a string and then remove them without knowing the actual length of the string?
Any help would be great