Of course it crashes. You need a string of sufficient length for copying a website. Define it either as a static char array, or allocate it with mem_alloc. Look into the links by AndrewAMD. And also consider looking in a C book: when you begin to work with arrays and allocations, it's a bit beyond the simple C from the workshops in the manual.