Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- char *url="http://teste.com.br/index.php?var=2&ball=7&search=lol";
- char *ptr=url;
- char *parse=(char *)malloc(sizeof(char)*4098);
- int counter=0,x=0,jmp=0;
- while(*ptr != '\0' && !jmp)
- {
- if(*ptr == '?')
- {
- ptr++;
- while( *ptr != '\0' && x < 4098-1)
- {
- *(parse+x)=*ptr;
- x++;
- ptr++;
- }
- jmp=1;
- }
- ptr++;
- }
- free(parse);
- fprintf(stdout,"%s\n",parse);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment