Back | Reverse | Quick Reply | Post Reply |

Alexastreet.com: Gendowned!
Link | by gendou on 2006-10-03 18:12:21 (edited 2006-10-03 18:12:50)
alexastreet.com gendowned
As you can see in the picture on the left, I have created an automated script to perform arbitrage transactions on the new Internet game alexastreet.com. The arbitrage process is simple:
  • 1. go http://alexastreet.com/show_ranks.php?limit=XXX where XXX is some random number
  • 2. click on a random site from the list.
  • 3. if the stock increased since last alexa.com update, but the stock has not been updated on alexastreet.com since then, buy it when it gets real close to (alexastreet.com) update time.
  • 4. twiddle your thumbs for a minute.
  • 5. sell the shares at the new (higher) price.
  • 6. repeat over and over, making immense profit in a short time period.
The automation is even simpler:
  • 1. Every morning, after updates, crawl the alexa.com rating of a big list of sites, looking for ones that went up.
  • 2. Record the date and time of the next (alexastreet.com) update for this good stocks.
  • 3. A cron script checks for rising sites that will update soon, buys them, then sells them shortly after they update
  • 4. laugh maniacally as you win teh internets while sleeping



Re: Alexastreet.com: Gendowned!
Link | by psoplayer on 2006-10-03 20:11:16
What is it with you and Alexa? Maybe you should move on to teh real stocks marketz so you won't have to depend on donations quite so much.


Re: Alexastreet.com: Gendowned!
Link | by gendou on 2006-10-03 22:34:35
i got hooked on alexadex a while back, and have also tried out the 2 clone sites that came out recently.
to me, it is a very fun game, one that tests my programming skills as well as internet knowledge.
i would play the real stock market, were it as easy to perform arbitrage as it is on these other sites.
a noteworthy difference is that in the real stock market, every transaction costs you money.


Re: Alexastreet.com: Gendowned!
Link | by Lulu on 2006-10-03 22:44:53 (edited 2006-10-03 22:53:04)
*viewing the alexastreet.com*

Interesting...

EDIT: Whoa,your money is increasing...$35,802,639.38

Where will the wind bring me on my next stop...?

Re: Alexastreet.com: Gendowned!
Link | by gendou on 2006-10-03 22:52:39
lol


Re: Alexastreet.com: Gendowned!
Link | by Lulu on 2006-10-03 22:59:03
the reason there are 10 minute breaks is because i pause playing the game to masturbate, pee, and eat. taking breaks is good ergonomics!

lmao XD

Where will the wind bring me on my next stop...?

Re: Alexastreet.com: Gendowned!
Link | by gendou on 2006-10-03 23:01:51
i just now added code to my script that causes it to work on random intervals, to make it look more "human".


Re: Alexastreet.com: Gendowned!
Link | by Lulu on 2006-10-03 23:07:35
I see...but still,that's quite impossible for other players to catch on you,am i right? ^.~

Where will the wind bring me on my next stop...?

Re: Alexastreet.com: Gendowned!
Link | by gendou on 2006-10-03 23:14:09
in time they could catch up to me, if i stopped the script from running.
the site owner may decide to ban me from playing, if he knew i was using scripts.


Re: Alexastreet.com: Gendowned!
Link | by Lulu on 2006-10-03 23:21:29
So,you gonna keep it on?

Where will the wind bring me on my next stop...?

Re: Alexastreet.com: Gendowned!
Link | by on 2006-10-04 11:06:05
Man...I wanna play with stocks too >.> it looks awsome, plus all the money from a fraction of something now THATS equivilent exchange...not really but for the guy getting all the money it is. XD


Re: Alexastreet.com: Gendowned!
Link | by gendou on 2006-10-04 14:38:38
the best part is, all the code i wrote for the automation scripts is only 110 lines of PHP and one small (3-field) MySQL table.


Re: Alexastreet.com: Gendowned!
Link | by on 2006-10-04 15:25:47
H-how do you do that!? I wanna learn how to do that! T.T


Re: Alexastreet.com: Gendowned!
Link | by gendou on 2006-10-04 17:02:35 (edited 2006-10-04 17:05:11)
well, i already had a sort of a generalized library built for alexadex and aleashare, so there was little to do but re-define the regular expressions and perform some cron-scripted logic.

i did all this in PHP, which is free to download and install.
head on over to php.net for downloads, as well as language reference.

if you want to know how i accomplished a specific detail, i would be happy to share snip-its of my code. :)

here is an one function i am particularly proud of, for its elegance:
function getQuote($domain)
{
	$pageData = doExec(array(
		$this->config['curl'],
		'-b', escapeshellarg("PHPSESSID=$this->sid;sess_id=$this->sid;username=$this->username"),
		escapeshellarg("{$this->config[url]}/view_site.php?site=$domain"),
	));

	if(preg_match('/You must be logged in to buy or sell shares/', $pageData)) die("You must be logged in to buy or sell shares!\n");

	if(preg_match('/Shares Available. ([\d]+)/', $pageData, $matches)) $shares =   intVal(str_replace(',', '', $matches[1]));
	if(preg_match('/nt Share Price. ([\d\.]+)/', $pageData, $matches)) $price  = floatVal(str_replace(',', '', $matches[1]));
	if(preg_match('/sell_amount value.([\d]+)/', $pageData, $matches)) $owned  =   intVal(str_replace(',', '', $matches[1]));
	if(preg_match('/buy_amount value.([\d]+)/',  $pageData, $matches)) $canBuy =   intVal(str_replace(',', '', $matches[1]));

	if(preg_match('/Next update. +(.*?)\./', $pageData, $matches))
	{
		$time = time();

		foreach(split(',', str_replace('  ', ' ', $matches[1])) as $value)
		{
			if(ereg('hour',   $value)) $time += intVal($value) * 3600;
			if(ereg('minute', $value)) $time += intVal($value) * 60;
			if(ereg('second', $value)) $time += intVal($value);
		}
	}

	return array(
		'shares' => $shares,
		'price'  => $price,
		'owned'  => $owned,
		'canBuy' => $canBuy,
		'time'   => $time
	);
}



Re: Alexastreet.com: Gendowned!
Link | by on 2006-10-04 18:13:10
that...is...awsome....and highly complicated for some *coughcough*


Re: Alexastreet.com: Gendowned!
Link | by psoplayer on 2006-10-08 22:06:03 (edited 2006-10-08 22:06:13)
Ever consider the fact that it would make it a lot easier for him to catch on to your scripting with a bunch of connections to alexastreet.com being refered by this very page?


Re: Alexastreet.com: Gendowned!
Link | by gendou on 2006-10-09 07:54:25 (edited 2006-10-09 07:56:04)
i considered it, but what's done is done.
it seems to me like the admin over there may not be very experienced.
there were many scary bugs in the closed beta, like pages that were vulnerable to MySQL injection.
if i get caught, i can just hide behind random proxies, or give up and use my time more productively.


Re: Alexastreet.com: Gendowned!
Link | by on 2006-10-10 12:57:34
man!! your still doing this?? i loked backed a couple of threads like 5 months ago or somewhat that time and it said that it was on your schedule, man, is it THAT addicting!?


Re: Alexastreet.com: Gendowned!
Link | by nivexus on 2006-10-10 21:43:43
Im still sort of hooked on alexadex :D. The lack of updates are screwing buy/sell cycles though.

Re: Alexastreet.com: Gendowned!
Link | by gendou on 2006-10-18 11:34:27
http://www.alexastreet.com/forum/showthread.php?p=669#post669

Ah, the whit of a Linux nerd.


Back | Reverse | Quick Reply | Post Reply |
Go to page: 0, 1 Displaying 1 to 20 of 22 Entries.

Copyright 2000-2024 Gendou | Terms of Use | Page loaded in 0.0046 seconds at 2024-12-01 19:49:20