RE: [PHP-ES] (roberto celrestino)URGENTE! please...
| From: | Celestino Roberto | Date: | Thu, 07 Dec 2000 18:19:01 +0000 |
| Subject: | RE: [PHP-ES] (roberto celrestino)URGENTE! please... | ||
| References: | 1 2 | Groups: | php.general.es |
| Request: | Send a blank email to general-es+get-4752@lists.php.net to get a copy of this message | ||
Sobre lo de windows, es que para probar antes de subir a las netras que son
servidores solaris que aqui usan, tengo que estar seguro que funciona, y mi
maquina linux hasta dos semanas la gente de soporte no la repara, y estoy
con la renga de windows.... asi que por eso,,,
Sobre con strip que busco hacer es stripearle el http header que envia al
comiennzo de la pagina,......
sobre lo de las variables, si obvio, pero piensa que eso lo hice en cinco
minutos,,,,, despues modificaremos bajo el estandar de nomenclatura que
estamos usando aqui........
GRACIAS!!!
----- Original Message -----
From: Alejandro Garín <garin_alejandro@yahoo.com>
To: <lista@phpes.com>
Sent: Thursday, December 07, 2000 2:45 PM
Subject: Re: [PHP-ES] (roberto celrestino)URGENTE! please...
> [...]
> >
> > Envio lo que hice y que funciona mal, en archivos grandes......
> > #include <winsock.h>
> > #include <stdio.h>
>
> 1)al margen de que te funcione o no, porque programas en c sobre windows?
> 2)a modo de consejo nomas, trata de usar nombres un poco mas descriptivos
> para variables y funciones... te va a servir mucho
> 3)que se supone que quieres hacer con la funcion strip(), ahi veo algo
raro
>
>
> Saludos
> --------
> Alejandro Garín
> Telecom Internet S.A.
>
>
> >
> > void abc(char *p)
> > {
> > FILE *fp=fopen("c:\\ober.txt","a+");
> > file://fprintf(fp,"%s",p);
> > fwrite(p,strlen(p)*sizeof(char),1,fp);
> > fclose(fp);
> > }
> > void strip(char *p)
> > {
> > *(p+(strlen(p)-4))='\0';
> > return;
> > }
> >
> > int d;
> > char aa[100];
> > char bb[100];
> > char cc[8000];
> > WSADATA ws;
> > SOCKET s;
> > struct sockaddr_in A;
> > int ii;
> > long gg;
> > char Headers[]=
> > "HTTP/1.1\r\n"
> > "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
> > application/vnd.ms-powerpoint, application/vnd.ms-excel,
> application/msword,
> > application/x-comet, */*\r\n"
> > "Accept-Language: en-us\r\n"
> > "Accept-Encoding: gzip, deflate\r\n"
> > "User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)\r\n"
> > "Host: 127.0.0.1\r\n"
> > "Connection: Keep-Alive\r\n"
> > "Cookie: CP=null*; elsitio_info=b;
> > elsitio%5Finfo=NAVEGACION=argentina&PAIS=argentina;
> weather=PAIS=argentina;
> > elsitio_pais=argentina\r\n";
> >
> > file://"HTTP\1.0\r\n""User-Agent:AuthClient\r\n""Accept:*/*\r\n";
> >
> > char R[8*1024];
> > void main (int argc, char *argv[])
> > {
> > gg=WSAStartup(0x0101,&ws);
> > file://sprintf(aa,"WSAStartup...%ld",gg);
> > file://MessageBox(0,aa,aa,0);
> > file://abc(aa);
> > s=socket(AF_INET,SOCK_STREAM,0);
> > file://sprintf(aa,"socket s=%ld",s);
> > file://abc(aa);
> > file://MessageBox(0,aa,aa,0);
> > A.sin_family=AF_INET;
> > A.sin_port=htons(80);
> > A.sin_addr.s_addr=inet_addr(argv[1]);
> > d=connect(s,(struct sockaddr *)&A,sizeof(A));
> > file://sprintf(aa,"d=%ld",d);
> > file://abc(aa);
> > strcpy(bb,"GET ");
> > strcat(bb,argv[2]);
> > strcat(bb," ");
> > strcat(bb,"/");
> > strcat(bb," ");
> > strcat(bb,Headers);
> > strcat(bb,"\r\n");
> > d=send(s,bb,strlen(bb),0);
> > sprintf(aa,"d=%ld",d);
> > abc(aa);
> > ii=1;
> > while(ii!=0)
> > {
> > ii=recv(s,R,sizeof(R),0);
> > strip(R);
> > if(ii!=0) abc(R);
> > }
> > exit(1);
> >
> > }
> >
>
>
>
> ---------------------------------------------------------------------
> Archivo On-line: http://www.phpes.com/
> Manual PHP en español: http://www.php.net/manual/es/
> Para dar de baja la suscripción, mande un mensaje a:
> lista-unsubscribe@phpes.com
>
>