So I'm trying to make a relatively complicated php script, using some code written in pike. The full source code is available here: http://www.text-image.com/pic2html.pike . It's only a learning experience really, as I'm not going to release it. However I would like to get it working!
int main(int arg
if (temp > 10485760) {
werr("Image too large (10MB limit).");
return 0;
}
string info = Stdio.stdin.read(temp);
if (strlen(info) < temp) {
werr("Insufficient data uploaded.");
return 0;
}
I understand the if statement on line 3."If the integer 'temp' is larger then 10485760, execute function 'werr' with the string ('Image too large (10MB limit.');
I also understand the if statement on line 8, which is very similar to the first statement.
What I don't understand is the
string info = Stdio.stdin.read(temp);
I don't understand the
int main(int arg
If I had to guess, I'd say the result of the function would be applied to an integer called 'main'? Is that right? How could this be emulated in php?
Thanks for your time!