euphoric Posted March 28, 2010 Report Share Posted March 28, 2010 (edited) Sveiki. Analizējot 'X' portāla, scripta, POST datu padošanu, caur FireBug var novērot šādu stringu : POST www.X.lv/script.php application/x-www-form-urlencoded {"status":"someStatus","someth":{"a":"0","b":50,"c":true,"d":false,"e":false}} Mēģināju sastādīt ar rociņām šo `request` un iebāzt kā GET , Url'ā .. www.X.lv/script.php?status=someStatus&someth[a]=0&someth=50&someth[c]=true&someth[d]=false&someth[e]=false Kā arī tāds variants : www.X.lv/script.php?status=someStatus&a=0&b=50&c=true&d=false&e=false Neiet cauri, vienīgais: "status=someStatus", tiek pieņemts un apstrādāts, bet pārējā daļa nē.. Kur varētu būt mana kļūda, pieraksts ? Paldies :) Edited March 28, 2010 by euphoric Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted March 28, 2010 Report Share Posted March 28, 2010 GET != POST Quote Link to comment Share on other sites More sharing options...
euphoric Posted March 28, 2010 Author Report Share Posted March 28, 2010 Nu jā, jā.. ,bet caur URL'u tāpat var iesmērēt (šad tad), kā pieņemsim tagad : ?status=someStatus , tiek apstrādāts. Un mēģināju caur cURL, padot kā POST, nesaprotu kpc. , bet tad pat pirmais => status=someStatus, netiek pieņemts . Quote Link to comment Share on other sites More sharing options...
waplet Posted March 28, 2010 Report Share Posted March 28, 2010 ar cURL linku raksti to status=somestatus un POST fields liec to , ko vajag. Quote Link to comment Share on other sites More sharing options...
Grey_Wolf Posted March 28, 2010 Report Share Posted March 28, 2010 tapec ka: "status":"someStatus" "someth":{"a":"0","b":50,"c":true,"d":false,"e":false}} tas ir ~~ tas pats kas PHP buutu --- $masivs['statuss']="someStatus"; $masivs2['a']=0; $masivs2['b']=50; $masivs2['c']=true; $masivs2['d']=false; $masivs2['e']=false; $masivs['someth']=$masivs2 --- tatad Arrya elements $masivs['statuss'] ietver sevii apaksmasiivu. a tu megjinaji padoot visu kaa vienliimenja masiivu. Visticamak tie POST dati nak no AJAX kursh padod JS objektu Quote Link to comment Share on other sites More sharing options...
euphoric Posted March 28, 2010 Author Report Share Posted March 28, 2010 Ah.., viss izrādijās daudz vienkāršāk nekā sākumā likas :) Tā arī atdevu : {"status":"someStatus","someth":{"a":"0","b":50,"c":true,"d":false,"e":false}} kā POST datus . Quote Link to comment 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.