tenbatsu (OP)
Newbie
Offline
Activity: 7
Merit: 0
|
|
June 18, 2011, 06:37:14 AM |
|
I used to be able to query the mtgox ticker with the following code: $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_URL, 'https://mtgox.com/code/data/ticker.php'); curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false); $result = curl_exec($c); curl_close($c);
2~3 hours ago that stopped working. I tried saving the certificate so I could query as follows: $c = curl_init(); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); curl_setopt($c, CURLOPT_URL, 'https://mtgox.com/code/data/ticker.php'); curl_setopt($c, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($c, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($c, CURLOPT_CAINFO, "./CAcerts/www.mtgox.com"); $result = curl_exec($c); curl_close($c);
That didn't work either. Did the API change somehow or is my code simply off?
|
|
|
|
|
|
Even if you use Bitcoin through Tor, the way transactions are handled by the network makes anonymity difficult to achieve. Do not expect your transactions to be anonymous unless you really know what you're doing.
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
tenbatsu (OP)
Newbie
Offline
Activity: 7
Merit: 0
|
|
June 18, 2011, 09:27:09 AM |
|
Nevermind, seems to be working again.
|
|
|
|
lightbox
|
|
June 18, 2011, 04:55:28 PM |
|
Not working again for me for about the past hour or so... but wget works fine, so something with php/curl is causing the problem use im using SSL_VERIFYPEER FALSE and SSL_VERIFYHOST FALSE
|
|
|
|
lightbox
|
|
June 18, 2011, 05:49:23 PM |
|
Solved, MagicalTux must have changed something, because now USERAGENT is required.
curl_setopt($ch, CURLOPT_USERAGENT, "curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18");
did the trick
|
|
|
|
|
philipp
Newbie
Offline
Activity: 30
Merit: 0
|
|
June 18, 2011, 05:54:22 PM |
|
Same problem here. libcurl doesn't work, but plain curl does. Will try setting the useragent.
Philipp
|
|
|
|
philipp
Newbie
Offline
Activity: 30
Merit: 0
|
|
June 18, 2011, 05:56:33 PM |
|
Solved, MagicalTux must have changed something, because now USERAGENT is required.
curl_setopt($ch, CURLOPT_USERAGENT, "curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18");
did the trick
Yeah. For the C programmers out there: curl_easy_setopt(curl, CURLOPT_USERAGENT, "Some bot."); will do the trick. Philipp
|
|
|
|
Clark
|
|
June 18, 2011, 10:27:09 PM |
|
Thanks so much for posting this! My services had bombed out today due to this change.
It would be nice for MagicalTux to create a developer mailing list or forum thread to keep us aware of this kind of thing...
|
|
|
|
tenbatsu (OP)
Newbie
Offline
Activity: 7
Merit: 0
|
|
June 19, 2011, 12:41:11 AM |
|
It would be nice for MagicalTux to create a developer mailing list or forum thread to keep us aware of this kind of thing... That or a page describing the API would be awesome.
|
|
|
|
Dirt Rider
Member
Offline
Activity: 111
Merit: 10
|
|
June 19, 2011, 05:43:01 AM |
|
Solved, MagicalTux must have changed something, because now USERAGENT is required.
curl_setopt($ch, CURLOPT_USERAGENT, "curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18");
did the trick
I usually don't even consider "tips" but damn lightbox, you just solved a HUGE headache for me! Donation address please!
|
|
|
|
lightbox
|
|
June 24, 2011, 01:39:25 AM |
|
Solved, MagicalTux must have changed something, because now USERAGENT is required.
curl_setopt($ch, CURLOPT_USERAGENT, "curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18");
did the trick
I usually don't even consider "tips" but damn lightbox, you just solved a HUGE headache for me! Donation address please! Lol glad i could help, i only pounded my head on the desk for about an hour to figure it out :p now if only mtgox would get back up so I can finish the tweaks on the bot! Thanks for the offer of a tip! here's an address: 1NgFb2LyyLvGaSHWasi2sYsn7iXDzDqzvb
|
|
|
|
|