Jump to content

html- post to php and get data in gzip deflated


abhivinay

Recommended Posts

Hi could some one tell what is going on  here in this tcp dump . It doesnt seem to be webservices . I got this trace from wireshark .

client POST to mypages.info and mypages.info  will send the data back .  Suppose 
if the client posts USER as user=8104  and server should reply the below plain data with gzip 
" test 123 test 456 test 789 " , 

if user=8105 then server will reply with teh data "test 321 test 654 test 987 " in encoded format . 
there is no index.php in POST request of client as you can see it from wireshark trace .but it just post to host mypages.info so i guess the index.php is taking care of sending the data to client.  Some one can help me with  server side index .php code to achieve this ?. 








POST / HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0
Content-Length: 25
Host: MYPAGES.INFO
Content-Type: application/x-www-form-urlencoded

user=8104&id=dl

HTTP/1.1 200 OK
Date: Wed, 08 May 2013 16:40:17 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.4.11
Content-Length: 522
Connection: close
Content-Type: text/html; charset=UTF-8

utK,../2.D&XZjAaCi.k.1*$W$R.0'\.v..eS~TaK\e^EXh..x.1wwA$.[*#9.kK.%...?VS;.o*$^{Y.og^.=..#ZH.?TV2
. .\(.W.6.[s.\2.4.+[V5...?G...-*$^$LF6w.a T]2 1.5YE5...?G.k.7;u
xU.v>.Eq..:.T;...`..fAxgz.vB.mnL.{.S2...5..0.Z.)E
$
#:(A(.W+..
:.Gf."Qv..?...?..:. *(\4.F*x\.$RMiS`[tTYbX[.?L.k.-- V8R]?1^. [P<.)Se..$...d..aUpzz.n.W.<.Nq.B'
n.7YE%..VfE@2.(1u.qX.i`U....kL .<..+ZH
4jB%.'w$]}CW7..E*Q
k.9.<[[aTHG)\H2F};.A$..hoR.s.F2.5
gY.6..Vo..<.$9u.2.@-iS.z..kL#.cItqw.3.@)i^D;V@".n\eJ.'...)..x.1*$W$R.v/.[q=

 

Link to comment
Share on other sites

Wow, yeah, you really aren't elaborating on any of this.

 

But okay.

<?php

ob_start("ob_gzhandler");
switch ($_POST["user"]) {
	case 8104:
		echo " test 123 test 456 test 789 ";
		break;
	case 8105:
		echo "test 321 test 654 test 987 ";
		break;
}
Link to comment
Share on other sites

Thankyou somuch equinix , its working .  what if i post multiple values  and test value if correct or not and then reply echo . is the below code is correct ?. Please help

 

POST body  contains from client is  user=8104&pass=1234

 

 

<?php
 
ob_start("ob_gzhandler");
switch ($_POST["user"]
switch ($_POST["pass"]) {
case (8104&1234):
echo " test 123 test 456 test 789 ";
        break;
    case (8105&5678):
        echo "test 321 test 654 test 987 ";
        break;
}

 

 

 

Please reply ...

 

Thank you

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.