liamthebof Posted May 1, 2010 Share Posted May 1, 2010 Hello, I firebug a website and found a form posting to a .ashx page with non php parameters. .ashx : http://cheaperzone.com/ajaxpro/pureland.Buy.Buy,pureland.ashx post: {"Game":"WOW","Server":"Archimonde-Horde","ChangeMonkey":"1"} I tried to curl using: <?php $ch = curl_init('http://cheaperzone.com/ajaxpro/pureland.Buy.Buy,pureland.ashx'); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{"Game":"WOW","Server":"Archimonde-Horde","ChangeMonkey":"1"}'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $info = curl_exec($ch); curl_close($ch); echo $info; ?> The firebug response was: new Ajax.Web.DataTable([["Unit","System.String"],["Unit1","System.String"],["Unit2","System.String"],["Price","System.String"],["Price1","System.String"],["Price2","System.String"],["MoneyLogo","System.String"],["UnitName","System.String"],["InStock","System.String"]],[["50000G","50000","50000","$226.88","226.88","226.88","$","G",""],["35000G","35000","35000","$158.99","158.99","158.99","$","G",""],["30000G","30000","30000","$136.88","136.88","136.88","$","G",""],["25000G","25000","25000","$113.88","113.88","113.88","$","G",""],["20000G","20000","20000","$90.88","90.88","90.88","$","G",""],["18000G","18000","18000","$81.88","81.88","81.88","$","G",""],["15000G","15000","15000","$68.88","68.88","68.88","$","G",""],["10000G","10000","10000","$45.88","45.88","45.88","$","G",""],["9000G","9000","9000","$41.88","41.88","41.88","$","G",""],["8000G","8000","8000","$36.88","36.88","36.88","$","G",""],["7000G","7000","7000","$32.88","32.88","32.88","$","G",""],["6000G","6000","6000","$27.88","27.88","27.88","$","G",""],["5000G","5000","5000","$23.88","23.88","23.88","$","G",""],["4000G","4000","4000","$18.88","18.88","18.88","$","G",""],["3500G","3500","3500","$16.88","16.88","16.88","$","G",""],["3000G","3000","3000","$14.88","14.88","14.88","$","G",""],["2500G","2500","2500","$11.88","11.88","11.88","$","G",""],["2000G","2000","2000","$9.88","9.88","9.88","$","G",""]]) My echo was blank. Any ideas. Thanks. Link to comment https://forums.phpfreaks.com/topic/200361-curl-php-ashx/ Share on other sites More sharing options...
Mchl Posted May 1, 2010 Share Posted May 1, 2010 Ideas about what? Link to comment https://forums.phpfreaks.com/topic/200361-curl-php-ashx/#findComment-1051541 Share on other sites More sharing options...
zarek Posted July 8, 2010 Share Posted July 8, 2010 Ideas about what? Ideas about why echo was blank. It's may be about HTTPHEADERS options. Try to get info of headers and add code like that: $header_array[0] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; $header_array[1] = 'Accept-Language: pl,en-us;q=0.7,en;q=0.3'; $header_array[2] = 'Accept-Encoding: gzip,deflate'; $header_array[3] = 'Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7'; $header_array[4] = 'Keep-Alive: 115'; $header_array[5] = 'Connection: keep-alive'; $header_array[6] = 'Content-Type: text/plain; charset=utf-8'; $header_array[7] = 'X-AjaxPro-Method: Login'; curl_setopt($login, CURLOPT_HTTPHEADER, $header_array); Link to comment https://forums.phpfreaks.com/topic/200361-curl-php-ashx/#findComment-1083145 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.