*Removed*
Edited by ,Jess, (Forum Super Moderator): Please do not argue with other forum members.

*Removed*
Edited by ,Jess, (Forum Super Moderator): Please do not argue with other forum members.
Last edited by ,Jess,; 06-09-2008 at 04:30 PM.
*Removed*
Edited by ,Jess, (Forum Super Moderator): Please do not argue with other forum members.
Last edited by ,Jess,; 06-09-2008 at 04:31 PM.
OKAY YOU BOTH DONE I WANT COMMENTS ON MY SCRIPT PLEASEEE NO MORE TROLLING PLZ THX UZ XXXX
Good script, could be much better with a few tweaks, like not using parenthesis in language constructs, but overall it's good.
How could this hapen to meeeeeeeeeeeeeee?lol.
Why do you haveOkai ladies and gents, and little scripters (you 1337 *****)
Here's some PHP & Lil Apache rewrite for you
Basically, I got bored and coded this up. It allows people to hotlink for a period of time, say 1 minute, or 50 hours?
Its not the best way to do it and could probably changed > alot <
Heres the main part of it...
I'ma post the folder here, so you can see how it all works alltogether, if ur interested.PHP Code:<?php
mysql_connect( 'localhost', 'dev_hotLink', 'hottie' ) or die( 'Error Mysql DB' );
mysql_select_db( 'dev_hotLinks' );
function createImg( $i )
{
$f = @file_get_contents( $i );
$iS = imagecreatefromstring( $f );
header( 'content-type: image/png' );
imagepng( $iS );
imagedestroy( $iS );
}
function hotLink( $i, $t, $a )
{
if( $i != '' && $t != '' )
{
if( is_numeric( $t ) )
{
$iS = rand() . '-imageHotlink-' . rand();
if( $q = mysql_query( 'INSERT INTO `hotlinks` (`id`, `img`, `session`, `timeout`, `time`) VALUES (NULL, "' . mysql_real_escape_string( $i ) . '", "' . $iS . '", "' . ( $t * 60 ) . '", "' . time() . '");' ) )
{
echo( '<img src="images/' . $iS . '" alt="' . $a . '" />' );
}
}
else
{
echo( '<img src="error.jpg" alt="' . $a . '" />' );
}
}
else
{
echo( '<img src="error.jpg" alt="' . $a . '" />' );
}
}
function findImage( $s )
{
if( $s != '' )
{
if( $q = mysql_query( 'SELECT * FROM `hotlinks` WHERE `session` = "' . mysql_real_escape_string( $s ) . '"' ) )
{
if( mysql_num_rows( $q ) >= 1 )
{
if( $f = mysql_fetch_array( $q ) )
{
if( abs( ( time() - $f[ 'time' ] ) ) <= $f[ 'timeout' ] )
{
createImg( $f[ 'img' ] );
}
else
{
mysql_query( 'DELETE FROM `hotlinks` WHERE `hotlinks`.`id` = "' . $f[ 'id' ] . '" LIMIT 1' );
createImg( 'hotlink.jpg' );
}
}
}
else
{
createImg( 'hotlink.jpg' );
}
}
else
{
createImg( 'error.jpg' );
}
}
else
{
createImg( 'error.jpg' );
}
}
?>
Heres the SQL => http://dev.e-mx.co.uk/dev_hotLinks.sql
Heres the ZIP => http://dev.e-mx.co.uk/hotlink.zip
FLAME FLAME FLAME :eusa_danc
xxxxxxx
Protege
when all the images are generated as .jpg?PHP Code:header( 'content-type: image/png' );
Wow, when will you learn that using parenthesis is a preference, there is no "right or wrong" unless you're writing scripts for huge web sights, then there might be a benefit of not using them.
Last edited by Jewish Bear; 06-09-2008 at 08:55 PM.
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
png is a better quality format.
visit my internet web site on the internet
http://dong.engineer/
it is just videos by bill wurtz videos you have been warned
aw ur so cute awwhh when u go serious, come here cuddly big teddy bear!!
Last edited by TheProtege; 06-09-2008 at 09:57 PM.
On php.net it actually says its bad. If your so worried I'm lying go find it.
That totally depends on the image.
How could this hapen to meeeeeeeeeeeeeee?lol.
Want to hide these adverts? Register an account for free!