header information
Moderator: General Moderators
- kendall
- Forum Regular
- Posts: 852
- Joined: Tue Jul 30, 2002 10:21 am
- Location: Trinidad, West Indies
- Contact:
header information
Hi,
I didnt no where to post this so if some one has an appropirate place...thanks
My question deals with using the header() to output content type based on a filename in php
now i no header(Content Type: text/html) is fo HTML
and header(Content Type: image/jpeg) is fo JPEG
but is there something 'standard' that can be used to header() whether its jpeg, gif, html, php , text, swf, a g-string thong, or a nut?
I didnt no where to post this so if some one has an appropirate place...thanks
My question deals with using the header() to output content type based on a filename in php
now i no header(Content Type: text/html) is fo HTML
and header(Content Type: image/jpeg) is fo JPEG
but is there something 'standard' that can be used to header() whether its jpeg, gif, html, php , text, swf, a g-string thong, or a nut?
-
Cruzado_Mainfrm
- Forum Contributor
- Posts: 346
- Joined: Sun Jun 15, 2003 11:22 pm
- Location: Miami, FL
Actually, text/html? Does that exists really?
Anyways, http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1494.html
Perhaps you will find more info there.
Anyways, http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1494.html
Perhaps you will find more info there.
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
When i think of adverts (and PHP combined) I think of the earlier discussions there have been using:LiLpunkSkateR wrote:include ("$filename");
whats wrong with that?
<img src="http://www.example.com/advertisment.php?id=23" />
advertisment.php is a script, that takes the id and returns 'something' based on that. If id 23 points to a .jpg, the script needs to send the correct headers for the image to show.
Take Jason's avatar on this forum. That avatar is really a random image generator script, working basicly the same way. Using include('file') will not work in this case.
If this is kendall's case, I do not know, but at least I might have shared some light on the subject.
- kendall
- Forum Regular
- Posts: 852
- Joined: Tue Jul 30, 2002 10:21 am
- Location: Trinidad, West Indies
- Contact:
JAM,
well i wish it was as simple as jpeg images well it cud be but im exploring the use of html and swf as advertisement files so i was researching options for using html headers and swf headers but the headers for these
are very different so im thinking i have to do some conditioning...just wanted to know what people do in these cases
well i wish it was as simple as jpeg images well it cud be but im exploring the use of html and swf as advertisement files so i was researching options for using html headers and swf headers but the headers for these
are very different so im thinking i have to do some conditioning...just wanted to know what people do in these cases
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
so why not just have the person using your advertising service go:
and on script.php have something that randomly picks and displays it using the correct tags
sorry if im totally off base, but this is my first time trying something like this and it seems like it should work..
Code: Select all
<?PHP include ("http://www.example.com/script.php?id=4858") ?>Code: Select all
<?PHP
display[0] = <img src="http://www.example.com/pic.gif">;
display[1] = <img src="http://www.example.com/pic2.jpg">;
display[2] = <flash tags = "http://www.example.com/flash.swf">;
display[3] = <a href="http://www.example.com/redirect.php?link=39">;
echo $display[random];
?>sorry if im totally off base, but this is my first time trying something like this and it seems like it should work..
- kendall
- Forum Regular
- Posts: 852
- Joined: Tue Jul 30, 2002 10:21 am
- Location: Trinidad, West Indies
- Contact:
lilPnuk,
Im using a database with a click stat position and stuff...sometimes i ask myself...why do i make things so hard...then i tell my self....because im an idiot...we do thing the hard way
even if i include i would have to do a number of header() combinations but i was also catering for a non-php world so i rezorted to using <script src="file.php"> scenario which would have allowed me to document.write the result but that has grown more difficult
i think im gonna go with the include i jus have to find the rite method of diaplying based on the type of file...
believe it or not there is a mime_content_type() that cud have solved my issues but gosh DARN it my IHP's have screwe me...again.
yes things are jus F@#! up wid me today
going and have a beer [henikin]
later
Kendall
Im using a database with a click stat position and stuff...sometimes i ask myself...why do i make things so hard...then i tell my self....because im an idiot...we do thing the hard way
even if i include i would have to do a number of header() combinations but i was also catering for a non-php world so i rezorted to using <script src="file.php"> scenario which would have allowed me to document.write the result but that has grown more difficult
i think im gonna go with the include i jus have to find the rite method of diaplying based on the type of file...
believe it or not there is a mime_content_type() that cud have solved my issues but gosh DARN it my IHP's have screwe me...again.
yes things are jus F@#! up wid me today
going and have a beer [henikin]
later
Kendall