EDIT: You can also remove the @ symbol before each of those three json_decode lines and it should spit out an error that will help find out what's wrong with the url.
I think I'm just doing something wrong, I got past the 301 error but now the only output I get is .E1-E2-E3 and then the process terminates. I think I must have configured something wrong with my php or I'm executing it wrong (I'm literally just putting php bot.php). PHP has never been my strong suit haha.
Your getting hit by their DDOS protection still.
Those errors show when you can't pull the ticker pages from E:
$BTCtoUSD = @json_decode( send( 'https://btc-e.com/api/2/btc_usd/depth' ), TRUE );
$LTCtoBTC = @json_decode( send( 'https://btc-e.com/api/2/ltc_btc/depth' ), TRUE );
$LTCtoUSD = @json_decode( send( 'https://btc-e.com/api/2/ltc_usd/depth' ), TRUE );
check those links from a browser using the same IP as the machine you are running the script from:
https://btc-e.com/api/2/btc_usd/depthhttps://btc-e.com/api/2/ltc_btc/depthhttps://btc-e.com/api/2/ltc_usd/depthThis is where swapping IP's comes in handy.
You can also stop the program from exiting (so it will keep trying to pull the books until your IP is banned

by removing this line:
if ( $e > 2 ) exit;