Gah! Area51 doesn't support my dynamic avatar. It says that the width/hieght can't be determined from it, even when specifying it manually. Is a php avy a thing of the past, or just something that hasn't been implemented yet?
And this place looks smooooooth. Very good job on the UCP too!
php based avatars...
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Re: php based avatars...
php avatars can been dangerous, especially if one of them attachement bad commands that will affect user's pc
Savre my posting level please
Savre my posting level please
2.2 Rocks!
-
- Registered User
- Posts: 31
- Joined: Wed Jun 11, 2003 2:43 pm
- Location: An arrangement of pixels on your screen.
- Contact:
Re: php based avatars...
Ahh, but php based signitures are still being used. Doesn't phpbb check the URL to make sure its an image before allowing people to load it in thier profile?
Btw, I gave you a good rating, but how did you get such a bad one?
Btw, I gave you a good rating, but how did you get such a bad one?
Re: php based avatars...
I've not tried a PHP originated avatar ... it should (in theory) work just like any other avatar assuming it returns data in the expected way. That's based on getimagesize() determining the imagetype rather than assuming the extension determines it (I would hope and expect it to be the former).
If you let me have the url to your image I'll check it out.
If you let me have the url to your image I'll check it out.
-
- Registered User
- Posts: 66
- Joined: Fri May 09, 2003 4:31 pm
- Contact:
Re: php based avatars...
I don't see how the server could possibly avoid PHP-based images, maybe there's just an incompatibility in how gdlib outputs these things.
If an avatar is generated dynamically, it is processed on the server on which it's stored, and sent to the client as image data, which in terms of format is indistinguisable from a statically stored image of the same format. PHP code from dynamic avatars/sigs are never sent to the client side, let alone executed there.Jaeboy wrote:php avatars can been dangerous, especially if one of them attachement bad commands that will affect user's pc
fun, sigs work!!!
-
- Registered User
- Posts: 31
- Joined: Wed Jun 11, 2003 2:43 pm
- Location: An arrangement of pixels on your screen.
- Contact:
Re: php based avatars...
http://www.skippercc.com/rand_avy/rand_avy.php is the link to the random avy. Here is it's code also:psoTFX wrote:I've not tried a PHP originated avatar ... it should (in theory) work just like any other avatar assuming it returns data in the expected way. That's based on getimagesize() determining the imagetype rather than assuming the extension determines it (I would hope and expect it to be the former).
If you let me have the url to your image I'll check it out.
Code: Select all
<?php
$online = @fsockopen("X.X.X.X", 80, $errno, $errstr, 30);
if( ! $online )
{
$avatar = "11.png";
}
else
{
// online avatar selection
$avatars[] = '1.png';
$avatars[] = '2.png';
$avatars[] = '3.png';
$avatars[] = '4.png';
$avatars[] = '5.png';
$avatars[] = '6.png';
$avatars[] = '7.png';
$avatars[] = '8.png';
$avatars[] = '9.png';
$avatars[] = '10.png';
srand ((float) microtime() * 10000000);
$random_key = array_rand( $avatars );
$avatar = $avatars[$random_key];
}
header('HTTP/1.0 302');
header('HTTP/1.1 307');
header('Location: http://'" target="_blank .$_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '/' . $avatar);
?>
Edited by psoTFX to remove IP
Re: php based avatars...
That's really not a good way of doing this ... and it's no surprise it won't work. You don't need nor should you redirect to the image. Just use passthru(); to send the image data straight to the browser after sending an appropriate content-type header (image/png in this case).
-
- Registered User
- Posts: 31
- Joined: Wed Jun 11, 2003 2:43 pm
- Location: An arrangement of pixels on your screen.
- Contact:
Re: php based avatars...
Ahh okay. I'll look into that function, thanks.
Board looks great!
Board looks great!
-
- Registered User
- Posts: 66
- Joined: Fri May 09, 2003 4:31 pm
- Contact:
Re: php based avatars...
psoTFX wrote:Just use passthru(); to send the image data straight to the browser after sending an appropriate content-type header (image/png in this case).
Actually, I think it would make more sense to use readfile(); instead of passthru();FF8Jake wrote:Ahh okay. I'll look into that function, thanks.
fun, sigs work!!!
-
- Registered User
- Posts: 31
- Joined: Wed Jun 11, 2003 2:43 pm
- Location: An arrangement of pixels on your screen.
- Contact:
Re: php based avatars...
@Adam: Readfile worked great! The reason a redirect was used, was so the browser could cache the avy and save on bandwidth, but as small as my avy is it should work fine. Thanks!