Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# My hack from 2003, probably still works
$mail = $_GET['mail'];
if ($mail)
$image = "wildcardphotos/$mail.jpg";
if (!file_exists ($image))
$uagent="Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)";
exec("wget -U \"${uagent}\" \"${getURL}\" --refer=\"${refURL}\" --output-document=\"${image}\"");
$size = filesize($image);
if ($size == 8130 || $size == 0) // the "Photo not avail" picture
if (file_exists ($image))
echo "$mail = <img height=200 src=\"$image\">";
echo 'not found';
echo '<p>Enter a Villanova email address to get their photo.</p><form><input name="mail"><input type=submit>';

This comment has been minimized.

Copy link
Owner Author

@fulldecent fulldecent commented Aug 7, 2016

This had a caching system to avoid duplicate downloads. It was part of HackNova which was basically Facebook before Facebook came out. Anyway, probably easier to just run like:

wget -U 'Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)' --refer '' '$EMAIL'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.