Post
Topic
Board Economics
Re: BTC-E PHP Currency Arbitrage Bot Full Code
by
grabble
on 12/05/2013, 22:40:11 UTC
Holy crap. Progress! (I think).

I started to understand php more and got suspicious of the send function.

I modified the function's options to this:

Code:


function send( $url = NULL )
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, FALSE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; BTCE PHP client; '.php_uname('s').'; PHP/'.phpversion().')');
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
$result = curl_exec($ch);
curl_close($ch);

return $result;
}


I seem to be getting this:

Code:
C:\Apache2\htdocs>php bot.php
..---..--.-------------------------------------------.--.--------------------.--------.-.-

At least it's not getting errors anymore right? I think it had to do with SSL using HTTPS. It was giving curl an error that wasn't coming over to the php side for me to see but when I started messing with curl I realized it was getting a certificate error ...