-1

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.

Archie Butler
  • 455
  • 6
  • 20
  • cant people do anything original? –  Jun 16 '13 at 21:30
  • It's probably easier to serve the homepage as a single graphic, rather than many small images. As CodeAngry says, pixel blocks on MDHP were sold in minimum sizes anyway - you can't render any text or logo with a single pixel `:-)`. – halfer Jun 16 '13 at 22:02

1 Answers1

1

You need good php for this and good sql and good caching 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:

  • Database stores regions (from and to coordinate pairs), link urls and actual uploaded images.
  • On each new added image you clear the cached version of HTML and generate a new one when the page is shown first time with a clear cache.
  • That new one is stored until a new user uploads a logo in a region.
  • HTML consists of either link or an image map. If you choose an image map, make sure to convert user images into one big image... but it's not really necessary.
  • Positioning on the grid has to be absolute. Make sure you split the grid into CSS or just inline CSS to place the logos on the DIV grid. DIV is position: relative while child regions are position: absolute + top and left.

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.

CodeAngry
  • 12,760
  • 3
  • 50
  • 57
  • Please! I am sure that if someone mapped it out for me, I could integrate it! Thanks @CodeAngry ! – Archie Butler Jun 16 '13 at 22:23
  • @ArchieButler Will this do? – CodeAngry Jun 16 '13 at 22:35
  • Ok... I see what you are saying... I am not BruceLee.php. I will need to hire a developer because in my concept it has to be pixel by pixel. I managed to write 10 000 urls manually in html and they appeared... But 100 times that must be too much. I will spend 300-400 dollars on hiring someone professional for a day. Thanks for your feedback though @CodeAngry. – Archie Butler Jun 16 '13 at 22:37
  • @ArchieButler 100 character minimum link, times 1.000.000 = 100 MB file (impossible to load EVER). You are aware of that... right? No in 10x10 increments you have: 100 chars times 10.000 = 1MB file. – CodeAngry Jun 17 '13 at 10:33