Fred do you have any sample php code for getBetHistory ? I did have something coded but recently reinstalled xp and as usual lost my mysql database and some of my code snippets :(
permalink
permalink
No need to reply Fred , I managed to get something up and running
permalink
ok I won't reply. Surprisingly, I found the answer pretty quickly on bdp forum :)
permalink
I'd forgotten about the BDP site when posting as haven't been there for ages Fred, as no one ever posts on the php side. It was a sad day when you took down te 77 site and associated snippets :)
Whilst you're around fred a couple of quickies -
Linux - how easy is it to use with php ? For some reason my php instals have goe to pot and crashes far too often these days reckon it may be my xp thats the prob but not sure (acer laptop with just some recovery cd not xp disc) Looking for something to run my bots on thats stable for the aussie stuff i do so thinking of dual boot or even possibly running linux of a cd or pendrive. Seen the pendrive stuff may be a no no as the drives only have a finite amount of write to's.
Poisson - Have you done anything with php & poisson distributions ? Used to have very succesful results in my old spreadbetting days but it was kind of a mish mash of marrying up excel with php generated database files to get my bets. I think I'm a bit more proficient with php these days and football-data.co.uk has all the stuff i need to automate things.
permalink
captain - I use some Poisson-related algorithms to pick out value bets on the Total Goals markets. They normally seem to do quite well (although they lost a lot of money this weekend as it happens).
I'm happy to post my PHP class that calculates Poisson probabilities (like the Excel POISSON function) if that would be helpful.
permalink
Captain Sensible - It is dead easy, almost like it is designed for it. Can't count how many free editors and testing tools there are available for php scripting on Linux and just about every one of them can be linked with the php parser so you can test your scripts out without hassle.
If you fancy having a go, download an ISO from Ubuntu and use wubi to install it (you will see the instructions when you put the disk in the drive). Basically works just like installing something in windows, except you end up with a dual boot enviroment.
Once you have your linux install, go to www.apachefriends.com and download the linux version of xampp. That includes apache, mysql and php as well as ftp servers and mail servers. You can turn the ones you don't want off and just use the ones you like.
Follow the instructions on the apachefriends site and you will be off in no time at all.
I've just gone through the process of installing xampp myself and was suprised at how easy it was.
Alan
permalink
captain - I use some Poisson-related algorithms to pick out value bets on the Total Goals markets. They normally seem to do quite well (although they lost a lot of money this weekend as it happens).I'm happy to post my PHP class that calculates Poisson probabilities (like the Excel POISSON function) if that would be helpful.
jpl that'd be a great help if you don't mind, save me figuring out the poisson calcs and trying to replicate them in php :( I did find some code on the net last night but haven't had time to look at it since getting back from my hols yesterday
inksmithy, I've already used the xammp for windows so guess I'll bite the bullet and try and go for a dual boot - can you use the current mysql data files or would I need to have duplicates for the linux instal ?
permalink
Yes, PHP is really easy to install with linux, you can probably get quite a reasonable PHP/MySQL setup just by telling your package manager to install phpmyadmin (the package manager is quite clever and will download and install all necessary stuff, e.g. apache,mysql,php,phpmyadmin). You can also put "PHP" into the package manager and search for any additional bits you might want adding, eg GD graphics or PHP CLI version. Once installed you can just forget about them as everything will be solid and kept updated. You can also use the XAMPP route if you want a quickly setup full development environment that is kept separate from the usual linux file system.
Get linux running on a spare machine that you can use as a dedicated bot server..... soon you'll have linux on your main machine ;)
Poisson - sorry, not used it.
permalink
captain - I've put my Poisson code (and a brief explanation) here:
permalink
jpl, thanks for the code exactly what I needed. Just need to code it up to cover all probable scores and it'll be able to set my odds for me :)
I've seen a lot of stuff about poisson underestimating draw odds but I've always found it useful to quickly whittle down markets I can look at in greater detail. In my old spreadbetting days I had simple php stuff working out spreads moe or less just using averages and the amount of times that was out of line with the spread firms was negligable. Sometimes it's easy to overlook the obvious at ths game and the quicker you can spot out of line prices/errors the quicker you can profit from them
permalink
inksmithy, managed to instal ubuntu using wubi nice and easy. Installing xampp wasn't too much of a pain once I'd figured out how to move files and get myself privaleges to write to the drives :(
Just need to transfer over my php scripts now and hopefully everything will be stable enough to run without crashes like xp
permalink
As far as using the MySQL data in the new linux version of MySQL goes, I have to say I'm not sure. That said thoug, I wouldn't have thought it was that much of an issue - you could probably just use phpmyadmin to dump the databases to an sql file, then open it up on the linux machine and restore it from there. Probably not a bad idea to do it that way anyway.
There are a few commands in linux which I find incredibly useful
chmod +x /path/to/file - allows a fille (bash script and so on) to be executed. Not a good idea if you don't know what the script does, but if you have just written it, thats the command to get it going.
chown -R username:usergroup /path/to/directory - the -R makes the permissions change work recursively through any directories in the path you supplied
Three variations on sudo:
sudo - the main one, useful for when you just need to run a single command
sudo su - makes you the superuser until you type 'exit' - useful for when you have to do a few things in the console
gksudo [gnome program name] - opens up the gnome program in superuser mode. Dangerous, but useful. Use it when you need nautilus to move files around in /opt or when you want to edit a config file but can't be arsed using nano.
Someone should probably have warned you about all those permissions - sorry bout that.
permalink
Yep all that permission stuff is a right pain after using windows and being able to mess around with anything and everything. I've figured out how to log in as root on ubuntu now so can at least drag and drop files into the folders for my php stuff that was in windows rather than trying to learn all the command line stuff.
Transferred the database stuff as sql files from phpmyadmin which was probably better as I could miss out some of the useless database stuff I'd messed around with testing things. Seems nice and stable though so eventually I'll probably set up my bot stuff via linux on an old pc
permalink
Permissions are one of the big advantages linux has (or had) over windows; you are probably better off biting the bullet and learning about them, then doing things right from the start. If you get into the habit of working as root on a routine basis, it will pretty soon bite you in the bum. root really is 'god' on a *nix system - on windows, even the default Administrator is limited in what it can do - linux will quite happily let root irretrievably trash the system without so much as an 'are you sure?' (been there, done that). Always try to limit su / sudo use to the ABSOLUTE minimum required.
This Topic Is Locked To Guest Posts
It's been a while since this topic was active, if you'd like to get it going again, please post as a registered member