Spotlights and vertex programs

Hi guys!
I found tons of point light per-pixel attenuation samples that use vertex programs but can find any examples that simulate spotlights in vertex programs. I’m not expirienced in opengl math so maybe someone did it. If someone knows where can I find code please answer me
Thanx in advance
Bye

Dot product the vertex pos and your spotlight matrix.

DP4 outTexture.x, mtx[0], inPosition;
DP4 outTexture.y, mtx[1], inPosition;
DP4 outTexture.z, mtx[2], inPosition;
DP4 outTexture.w, mtx[3], inPosition;

Goodluck.

Could you please give me source code
and shader?