Help with sending strings with PHP to arduino

Also, if I use dio functions will the arduino reset problem still occur?
Exactly why is it resetting?