Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

imagepng (PHP)

Featured Replies

Aight, so I've made a dynamic signature, all that is fine, etc however, for some reason, even when specified to output a png image, I get a php page.

 

The code (this is a test for it, this theoretically should work):

<?php
$my_img = imagecreate( 200, 80 );
$background = imagecolorallocate( $my_img, 0, 0, 255 );
$text_colour = imagecolorallocate( $my_img, 255, 255, 0 );
$line_colour = imagecolorallocate( $my_img, 128, 255, 0 );
imagestring( $my_img, 4, 30, 25, "testing",
  $text_colour );
imagesetthickness ( $my_img, 5 );
imageline( $my_img, 30, 45, 165, 45, $line_colour );

header( "Content-type: image/png" );
imagepng( $my_img );
imagecolordeallocate( $line_color );
imagecolordeallocate( $text_color );
imagecolordeallocate( $background );
imagedestroy( $my_img );
?>

Output:

http://www.zscriptz.x10.mx/gensig/12.php

Notice that when you go there, it will say "12.php" not "12.png"

Could this be my webhost?

Any help is appreciated

As mentioned above, modify your .htaccess file.

 

Code:

 RewriteRule ^gensig.png$ gensig.php [L]

 

 

  • Author

To be quite honest with you I cried when you showed that you do not understand file extensions. 

 

To be quite honest I don't give a fuck

  • Author

Figure it out on yourself then.

 

All I did was ask for help. What I didn't ask for is for you to vent your superiority issues on me. I don't know what you're trying to prove here, that I'm not as skilled as you in a language that I have learned very little about? Because you're right. There was absolutely no need for your comment other than to enlarge dat e-peen, which I guess you did. So congrats.

All I did was ask for help. What I didn't ask for is for you to vent your superiority issues on me. I don't know what you're trying to prove here, that I'm not as skilled as you in a language that I have learned very little about? Because you're right. There was absolutely no need for your comment other than to enlarge dat e-peen, which I guess you did. So congrats.

I gave you an answer and I gave my own opinion. This had nothing at all to do with the language, it's basic understanding of file extensions which any computer user who has more knowledge than my grandmother should know about. It's not like I only posted the insult, I posted it together with an answer. Now either you can continue bitching about it or take it as a man and take a look at the answer I provided you with, it's up to you.

Edited by Parameter

  • Author

I gave you an answer and I gave my own opinion. This had nothing at all to do with the language, it's basic understanding of file extensions which any computer user who has more knowledge than my grandmother should know about. It's not like I only posted the insult, I posted it together with an answer. Now either you can continue bitching about it or take it as a man and take a look at the answer I provided you with, it's up to you.

 

 

<?php
header('Content-Type: image/png');
?>

So tell me why this didn't work?

<?php
header('Content-Type: image/png');
?>

So tell me why this didn't work?

 

Alright. You see, you've saved the file as .php, the file extension won't magically change so you'll need to save it as .png if you want it to look like a .png file. Now, here comes the 'tricky' part, you need to modify (or create if you don't already have it) your .htaccess file. Why? Then your .png files will be parsed as .php files. 

  • Author

EDIT: For anyone who may use this at a later, none of the above worked for me. I came up with another solution however;

 

.htaccess:

<Files fakelogo.png> //whatever file you use below
ForceType application/x-httpd-php //parses it as a php file
</Files>

Then create a fakelogo (mine was fakelogo.png), edit it and put your output method :)

Edited by zScripz

EDIT: For anyone who may use this at a later, none of the above worked for me. I came up with another solution however;

 

.htaccess:

<Files fakelogo.png> //whatever file you use below
ForceType application/x-httpd-php //parses it as a php file
</Files>

Then create a fakelogo (mine was fakelogo.png), edit it and put your output method smile.png

You do know that's exactly what we told you to do lol

Actually, all you need to do is edit the .htaccess, like mentioned above.

Output:
osbot.png

Edited by BrainDeadGenius

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.