• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

Image on a fly

an expression. they use.. liek instead of making a html page for ever image.. just make one html page and call the image out with that.
 
Originally posted by Johnny
an expression. they use.. liek instead of making a html page for ever image.. just make one html page and call the image out with that.

can you give me an example, I still don't get it. :p


Originally posted by is0lized



you know exactly what he is talking about, stop spamming please :mad:

What the hell is wrong with you? I am trying to help him. If I know what he is trying to do, I may write the perl script for him for free.
 
your whats wrong...


let me explain this even more in plain english...


he wants a perl/php program to create images for him. all he has to do is fill in a few variables and press submit
 
yupapa, you're so unfunny it's laughable. and if you're not being a dork and you really are that stupid, it's a damn shame. a damn shame...

here you go johnny, pay no attention to him:
PHP:
<html>
<head>
<title>Images Viewer</title>
</head>

<body>

<center>

<?
if (file_exists("$DOCUMENT_ROOT/images/$QUERY_STRING")) {
?>
<img src="/images/<? echo("$QUERY_STRING"); ?>" border="2"><br>
<?
}

else {
?>
<font face="arial" size="2"><b>
Whoops! No such image.<br>
</b></font>
<?
}
?>

</center>

</body>
</html>
call it like this:
Code:
/images.php?picture.jpg

in action at [url]http://www.weezerfans.com/rock/discs.shtml[/url]
put all your pictures in the /images/ directory [or whichever directory you specify in the script]
 
Last edited:
how do i edit it so that I would have my own html design? cause this is just a plain page with the image you call out.

And on that site they had "http://www.weezerfans.com/rock/discs/sayitaintso.jpg"
that is where the image is at.. but the script "http://www.weezerfans.com/images/discs.php" is here.. aren't they suppose to be in teh same dir?
 
Originally posted by keith
yupapa, you're so unfunny it's laughable. and if you're not being a dork and you really are that stupid, it's a damn shame. a damn shame...
[/code]

keith always revolves around me.
Whenever I post something on the board, he always reply me right away. And most of them are usually useless because why? He wants to attack or insult me. And that's make him really cool isn't it?

SO what did I do to him making him treating me this way? I really want to know the answer. Is he bored and needs to make fun of me?

And you think that I really do know what Johnny is trying to do?? sorry, but not everyone knows everything in the whole world...
I never said I am a smart person, so why did you all thought I knew what Johnny was trying to do?
 
Originally posted by Johnny
how do i edit it so that I would have my own html design? cause this is just a plain page with the image you call out.

And on that site they had "http://www.weezerfans.com/rock/discs/sayitaintso.jpg"
that is where the image is at.. but the script "http://www.weezerfans.com/images/discs.php" is here.. aren't they suppose to be in teh same dir?

You can add the "include" code at the top of the script OR just edit the header in that php file.
 
Originally posted by Johnny
yupapa even I believe you are just acting stupid.. and f-ing aroudn with me.

I do? how?

Is that because I pointed out the thread about your hosting?? that makes you treating me this way? Well I am sorry... and you are right... you shouldn't host anyone when you promote your service at the free web space forum. Does that make you feel better now?
 
Originally posted by YUPAPA


You can add the "include" code at the top of the script OR just edit the header in that php file.

make me an example please.. yupapa uf know this, how coould u not know what on the fly means. after somone explain it to you u still say you don't know.. see what i mean you just tryint to act stupid.

Ok.. I really dont' know jack about php.. anyone could show me what i need to do for it to work.
 
Originally posted by Johnny


make me an example please.. yupapa uf know this, how coould u not know what on the fly means. after somone explain it to you u still say you don't know.. see what i mean you just tryint to act stupid.

Ok.. I really dont' know jack about php.. anyone could show me what i need to do for it to work.

Do you know not everyone speak english as their first language.
If you do a search on this forum, you will find my english is funny.

<?
include("theheader.html");
// ... some other php code
?>
 
English isnt my first language and im only 14. Lived in Usa for only 3 years and dont speak crappy English.
 
<?
include("theheader.html");
// ... some other php code
?>
?

this is making it difficult for me .. please.. i dont' know jack about php.. make it so that i could understand it..

is that the only way i could put in my own design? can't I put in the html code instead of make everysingle different html files.
so i would look the desgin i want.
 
Actually I am a perl programmer... I am not familiar with PHP... But if you need one in perl, here is the source code

Code:
#!/usr/bin/perl

my $imageDIR = qq($ENV{'DOCUMENT_ROOT'}/path/to/image/dir);
my $imageURL = qq([url]http://www.yourdomain.com/path/to/image/dir[/url]);
my @image_ext = ("jpg","jpeg","jpe","gif");

chdir($imageDIR);
foreach (<*>) {
	chomp;
	@ext = split(/\./,$_);
	foreach $extension (@image_ext) {
		if($ext[1] eq $extension) {
		print qq(
			<IMG SRC="$imageURL/$_">
		);
	}
}
Haven't tested it out yet, but I hope it works
 
Here is one that comes with header and footer:

Code:
#!/usr/bin/perl

my $imageDIR = qq($ENV{'DOCUMENT_ROOT'}/path/to/image/dir);
my $imageURL = qq([url]http://www.yourdomain.com/path/to/image/dir[/url]);
my @image_ext = ("jpg","jpeg","jpe","gif");

&header;
chdir($imageDIR);
foreach (<*>) {
	chomp;
	$ext = split(/\./,$_);
	foreach $extension (@image_ext) {
		if($ext eq $extension) {
		print qq(
			<IMG SRC="$imageURL/$_">
		);
	}
}
&footer;

sub header {
	print qq(
	<HTML>
	<HEAD><TITLE>My images</TITLE></HEAD>
	<BODY>
	Header<P>
	);
}

sub footer {
	print qq(
	<P>Footer<P>
	</BODY>
	</HTML>
	);
}
 
Back
Top