I am a front end developer (html, css, Wordpress) who is starting to dabble in .js and .php.
I want to create a page similar to the www.milliondollarhomepage.com
I want every one of those million pixels to point at a series of links:
Html
<div class="b">
<a href="/1/"><img class="a" src="/images/1pixelpic.png"></a>
<a href="/2/"><img class="a" src="/images/1pixelpic.png"></a>
<a href="/3/"><img class="a" src="/images/1pixelpic.png"></a>
---Up To ---->
<a href="/999998/"><img class="a" src="/images/1pixelpic.png"></a>
<a href="/999999/"><img class="a" src="/images/1pixelpic.png"></a>
<a href="/1000000/"><img class="a" src="/images/1pixelpic.png"></a>
</div>
css
.a { float:left; }
.b { width:1000px;height:1000px; }
This is too long. It crashes in notepad++.
How do I write a .php include script that would look like:
<include php path="mymillionlinks.php">
And that file would look like
<div class="b">
<php write>
if call "<a href="/{1}/"><img class="a" src="/images/1pixelpic.png"></a>" < 1 000 000
then write "<a href="/{1+1}/"><img class="a" src="/images/1pixelpic.png"></a>"
<end php>
</div>
My php is not good enough yet. I hope I have explained myself well. Thanks. Archie.
You need good
php
for this and goodsql
and goodcaching
or static image generation with map. And there are multiple approaches to the functionality.And if you code php in notepad++, you are already defeated. There's are IDEs for us, php devs.
As far as I remember, he only sold pixels in 10x10 batches minimum. Look at his grid. Doing 1x1 will keep you quite busy.
UPDATE
In frontend part you need a method of selection pixel regions and upload their image and setup link. And always do 10x10px increments. Pixel fonts fit 10px heights so that's the starting point.
In backend part:
position: relative
while child regions areposition: absolute
+top
andleft
.This is the story of how it should work. Obviously, you'll need to handle user registration, login, payments, image screening so they don't porn you :) and such.
PS: You don't make a million dollars that easy :) You need to have coding kung-fu.