gabchampagne
Messages postés216Date d'inscriptionmercredi 2 avril 2003StatutMembreDernière intervention 5 mai 2004 28 nov. 2003 à 19:01
Pi une question. POURQUOI DONNEZ VOUS 10/10 à ça. C bien trop simple. C comme si je mettais mon prog pour tester mes serveurs sur le site et que j'aurais 10/10! Inclu au moins la source que j'ai fourni. Là ça vaudrait de quoi.
gabchampagne
Messages postés216Date d'inscriptionmercredi 2 avril 2003StatutMembreDernière intervention 5 mai 2004 28 nov. 2003 à 18:55
Pi merci EB. Ça va m'aider pour mon serveur HTTP.
gabchampagne
Messages postés216Date d'inscriptionmercredi 2 avril 2003StatutMembreDernière intervention 5 mai 2004 28 nov. 2003 à 15:08
Je sais. GET est plutot conçut pour télécharger une page web. Mais POST, lui sert à poster des données donc il devrait normalement en contenir (sauf qulques exceptions).
cs_EBArtSoft
Messages postés4525Date d'inscriptiondimanche 29 septembre 2002StatutModérateurDernière intervention22 avril 20199 28 nov. 2003 à 10:56
c'est simple pour " " = %20 car Hex$(Asc(" ")) = "20"
en fait c'est juste la representation hexadecimal du caractere en question generalement pout tout les caracteres non AlphaNumerique
que ce soit dans la method POST ou GET le content n'est pas obligatoire tout depend de la version HTTP et des preferences
du serveur (voir les RFC correspondante).
@+
gabchampagne
Messages postés216Date d'inscriptionmercredi 2 avril 2003StatutMembreDernière intervention 5 mai 2004 27 nov. 2003 à 18:54
oops, je veux dire
Sock1.GetData strData, vbString
dim fso,texte,apppath,col,vars,f
apppath=app.path
if right(apppath,1) <> "" then apppath=apppath & ""
col=split(strdata,chr(13)+chr(10) & chr(13)+chr(10),2)
vars=col(ubound(col))
col=split(strdata,chr(13)+chr(10))
col=split(col(0)," ",3)
if ubound(col)>1 then
f=col(1)
end if
col=split(vars,"&")
set fso=createobject("scripting.filesystemobject")
set texte=fso.opentextfile(apppath & "vars.txt",8,true)
texte.write f & vbcrlf
for i = 0 to ubound(col)
texte.write col(i) & vbcrlf
next
texte.write vbcrlf
texte.close
set fso=nothing
set texte=nothing
gabchampagne
Messages postés216Date d'inscriptionmercredi 2 avril 2003StatutMembreDernière intervention 5 mai 2004 27 nov. 2003 à 18:52
Est-ce que quelqu'un saurais comment faire pour convertir les valeurs pour que "a b" = a%20b" parce que les valeurs ne doivent pas contenir certains caractères. Je crois qu'il y a aussi moyen d'envoyer des données avec GET. La seule différence est que la méthode est GET. P.S. Avec post, je crois qu'il est oubligatoire d'indiquer la taille de "content" (dans le header) avec :
Content-Lenght: "TAILLE DU CONTENT"
Il y a aussi Content-Type qui renvoie le type MIME
j'ai une idée si tu veux faire de quoi de hot : Voici ce que ça va faire. Sa va écrire dans un fichier dans le path du programme le fichier auquel le client voulait se connecter et lister tout les champs avec leur valeur. C'est propre.
ajoute sa dans DataArrival :
Sock1.GetData strData, vbString
dim fso,texte,apppath,col,vars,f
apppath=app.path
if right(apppath,1) <> "" then apppath=apppath & ""
col=split(strdata,chr(13)+chr(10) & chr(13)+chr(10),2)
vars=col(ubound(col))
col=split(strdata,chr(13)+chr(10))
col=split(col(10)," ",3)
if ubound(col)>1 then
f=col(1)
end if
col=split(vars,"&")
set fso=createobject("scripting.filesystemobject")
set texte=fso.opentextfile(apppath & "vars.txt",8,true)
texte.write f & vbcrlf
for i = 0 to ubound(col)
texte.write col(i) & vbcrlf
next
texte.write vbcrlf
texte.close
set fso=nothing
set texte=nothing
Cyberdevil
Messages postés483Date d'inscriptionmardi 10 juillet 2001StatutMembreDernière intervention12 juillet 2006 27 nov. 2003 à 15:11
bcp plus simple de renseigner le champs proxy d'IE par localhost..
ainsi pas besoin de modifier la page !
gabchampagne
Messages postés216Date d'inscriptionmercredi 2 avril 2003StatutMembreDernière intervention 5 mai 2004 27 nov. 2003 à 14:22
lol. c cave FAIT QUELQUE CHOSE QUI ANALYSE BON SANG. POST est simple:
1-Tu envoie un header HTTP "POST"
2- 2 retours de chariots chr(13)+chr(10)
3- Le format :
"champs"="valeur"&"champs"="valeur"
cs_skyraider
Messages postés7Date d'inscriptionjeudi 1 février 2001StatutMembreDernière intervention 1 mai 2005 27 nov. 2003 à 13:36
28 nov. 2003 à 19:01
28 nov. 2003 à 18:55
28 nov. 2003 à 15:08
28 nov. 2003 à 10:56
en fait c'est juste la representation hexadecimal du caractere en question generalement pout tout les caracteres non AlphaNumerique
que ce soit dans la method POST ou GET le content n'est pas obligatoire tout depend de la version HTTP et des preferences
du serveur (voir les RFC correspondante).
@+
27 nov. 2003 à 18:54
Sock1.GetData strData, vbString
dim fso,texte,apppath,col,vars,f
apppath=app.path
if right(apppath,1) <> "" then apppath=apppath & ""
col=split(strdata,chr(13)+chr(10) & chr(13)+chr(10),2)
vars=col(ubound(col))
col=split(strdata,chr(13)+chr(10))
col=split(col(0)," ",3)
if ubound(col)>1 then
f=col(1)
end if
col=split(vars,"&")
set fso=createobject("scripting.filesystemobject")
set texte=fso.opentextfile(apppath & "vars.txt",8,true)
texte.write f & vbcrlf
for i = 0 to ubound(col)
texte.write col(i) & vbcrlf
next
texte.write vbcrlf
texte.close
set fso=nothing
set texte=nothing
27 nov. 2003 à 18:52
Content-Lenght: "TAILLE DU CONTENT"
Il y a aussi Content-Type qui renvoie le type MIME
j'ai une idée si tu veux faire de quoi de hot : Voici ce que ça va faire. Sa va écrire dans un fichier dans le path du programme le fichier auquel le client voulait se connecter et lister tout les champs avec leur valeur. C'est propre.
ajoute sa dans DataArrival :
Sock1.GetData strData, vbString
dim fso,texte,apppath,col,vars,f
apppath=app.path
if right(apppath,1) <> "" then apppath=apppath & ""
col=split(strdata,chr(13)+chr(10) & chr(13)+chr(10),2)
vars=col(ubound(col))
col=split(strdata,chr(13)+chr(10))
col=split(col(10)," ",3)
if ubound(col)>1 then
f=col(1)
end if
col=split(vars,"&")
set fso=createobject("scripting.filesystemobject")
set texte=fso.opentextfile(apppath & "vars.txt",8,true)
texte.write f & vbcrlf
for i = 0 to ubound(col)
texte.write col(i) & vbcrlf
next
texte.write vbcrlf
texte.close
set fso=nothing
set texte=nothing
27 nov. 2003 à 15:11
ainsi pas besoin de modifier la page !
27 nov. 2003 à 14:22
1-Tu envoie un header HTTP "POST"
2- 2 retours de chariots chr(13)+chr(10)
3- Le format :
"champs"="valeur"&"champs"="valeur"
27 nov. 2003 à 13:36