kvarnerexpress 0 Report post Posted February 28, 2006 From the environment variables, i get the domain of the referring site using SERVER_NAME. The includes www. and i have to remove that. I dont believe there is a variable in the environment that contains only the domain.So I would need to replace each character in the char* string by "" until i hit a '.' then replace the dot with "" and get the remaining string. Here is the catch. I can't include big headers because i need the file to stay really small around 20-30kb. So ideally, would need to use functions in stdlib.h stdio.h or string.h to get this done.Thanks in advance Share this post Link to post Share on other sites
kvkv 0 Report post Posted March 2, 2006 Here is an easy solution for your problem. {servenv++;}while((*servenv)!='.'); //increment char* till next character to '.'//use servenv here. it points to next character of the first '.' Share this post Link to post Share on other sites