abhivinay Posted May 8, 2013 Share Posted May 8, 2013 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.0Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*Accept-Language: en-usAccept-Encoding: gzip, deflateUser-Agent: Mozilla/4.0Content-Length: 25Host: MYPAGES.INFOContent-Type: application/x-www-form-urlencodeduser=8104&id=dlHTTP/1.1 200 OKDate: Wed, 08 May 2013 16:40:17 GMTServer: Apache/2.2.15 (CentOS)X-Powered-By: PHP/5.4.11Content-Length: 522Connection: closeContent-Type: text/html; charset=UTF-8utK,../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;uxU.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 .<..+ZH4jB%.'w$]}CW7..E*Qk.9.<[[aTHG)\H2F};.A$..hoR.s.F2.5gY.6..Vo..<.$9u.2.@-iS.z..kL#.cItqw.3.@)i^D;V@".n\eJ.'...)..x.1*$W$R.v/.[q= Quote Link to comment https://forums.phpfreaks.com/topic/277808-html-post-to-php-and-get-data-in-gzip-deflated/ Share on other sites More sharing options...
requinix Posted May 8, 2013 Share Posted May 8, 2013 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; } Quote Link to comment https://forums.phpfreaks.com/topic/277808-html-post-to-php-and-get-data-in-gzip-deflated/#findComment-1429149 Share on other sites More sharing options...
abhivinay Posted May 9, 2013 Author Share Posted May 9, 2013 Thank you i will try this out Quote Link to comment https://forums.phpfreaks.com/topic/277808-html-post-to-php-and-get-data-in-gzip-deflated/#findComment-1429250 Share on other sites More sharing options...
abhivinay Posted May 9, 2013 Author Share Posted May 9, 2013 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 Quote Link to comment https://forums.phpfreaks.com/topic/277808-html-post-to-php-and-get-data-in-gzip-deflated/#findComment-1429284 Share on other sites More sharing options...
requinix Posted May 9, 2013 Share Posted May 9, 2013 No, it's not. You need to learn PHP before you try to write code for it. Quote Link to comment https://forums.phpfreaks.com/topic/277808-html-post-to-php-and-get-data-in-gzip-deflated/#findComment-1429332 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.