d2jsp
Log InRegister
d2jsp Forums > d2jsp > Ladder Slasher > Guide: How-to Make A Dynamic Ladder-slasher Sig > In A Few Easy Steps With Pics
Prev1444546474860Next
Add Reply New Topic New Poll
Member
Posts: 5,053
Joined: Jul 3 2006
Gold: 198.86
Jun 21 2009 10:02am
Quote (shadowice @ Sat, Jun 20 2009, 09:47pm)
i have the same problem with mine as stated above.  i included the .htaccess in the same root file even unziped the package file included and put it in my directory and it wouldnt change his png either.  When i ran the 2 test files everything on mine matched his except my php version seemed to be newer.  Any ideas or could someone point me to a differnet free host

Here is the imagehttp://shadowice.comxa.com/shadowice.png


here is the link to the php file http://shadowice.comxa.com/shadowice.png.php5


when I click your php file link. It works, I see this:
Member
Posts: 4,921
Joined: Mar 25 2008
Gold: 1.02
Jun 21 2009 10:21am
remove the .php5 behind it and it should be fine :)

e/ so instead of: [img]http://shadowice.comxa.com/shadowice.png.php5[/img]
make it: [//IMG] http://shadowice.comxa.com/shadowice.png [//IMG]

oohhhh, i see whats going on :)

did you name the background image the same as the .php5 file?

e// if this is not the case: pm me your php5 code and a screenshot of all the files in your uploading directory.
this should be easy to fix :)

This post was edited by coldguy on Jun 21 2009 10:28am
Member
Posts: 34,410
Joined: Feb 2 2006
Gold: 0.00
Jun 21 2009 10:25am
Quote (shadowice @ Sun, 21 Jun 2009, 06:47)
i have the same problem with mine as stated above.  i included the .htaccess in the same root file even unziped the package file included and put it in my directory and it wouldnt change his png either.  When i ran the 2 test files everything on mine matched his except my php version seemed to be newer.  Any ideas or could someone point me to a differnet free host

Here is the imagehttp://shadowice.comxa.com/shadowice.png


here is the link to the php file http://shadowice.comxa.com/shadowice.png.php5



http://shadowice.comxa.com/shadowice.png.php5/shadowice.png
Member
Posts: 763
Joined: May 10 2009
Gold: 1,200.59
Jun 21 2009 11:24am
ty derfana that worked
Member
Posts: 5,053
Joined: Jul 3 2006
Gold: 198.86
Jun 21 2009 11:40am
Quote (stiffleronfire @ Sat, Jun 20 2009, 09:19pm)
ok.

First I checked with the info.php5 and gd.php5 files to make sure it was good, and it matches what I am supposed to have.

I downloaded the files from the tutorial and simply uploaded them to my webhost. All 4 files are in one folder (is this correct?)

I go to
Code
http://blahblah/etc..../don.png.php5

I get this:

"Error 403 - Forbidden

You tried to access a document for which you don't have privileges."

So, I figure it must be permissions right? So I set all permissions on, and still get the same thing.

I go on and on for the next hour trying various extension changes, changing the .htaccess text and I am still stuck.

Any tips?


bump.
I re-read all of these pages, and it looks like this is a common problem. Is it the ability of your host to support this type of sig? Should I try a different host? Or am I doing something wrong?
Member
Posts: 763
Joined: May 10 2009
Gold: 1,200.59
Jun 21 2009 11:44am
i just got a free host other day think it was http://000webhost.com as long as you dont post in the main root it works fine you have to put it inside the public_html folder it gives you.

This post was edited by shadowice on Jun 21 2009 11:47am
Member
Posts: 5,053
Joined: Jul 3 2006
Gold: 198.86
Jun 21 2009 02:18pm
Quote (shadowice @ Sun, Jun 21 2009, 10:44am)
i just got a free host other day think it was http://000webhost.com  as long as you dont post in the main root it works fine you have to put it inside the public_html folder it gives you.


Yeah, I guess it is my host. Even though the initial info.php5 and gd.php5 files show that my host is able to support this, guess it doesn't. The host you linked to works great though, thanks, back to making the sig! :)
Member
Posts: 4,921
Joined: Mar 25 2008
Gold: 1.02
Jun 21 2009 02:32pm
hope it works out for you.

ask again if problems occur
Member
Posts: 763
Joined: May 10 2009
Gold: 1,200.59
Jun 21 2009 05:11pm
Quote (stiffleronfire @ Sun, Jun 21 2009, 04:18pm)
Yeah, I guess it is my host. Even though the initial info.php5 and gd.php5 files show that my host is able to support this, guess it doesn't. The host you linked to works great though, thanks, back to making the sig!  :)


np i had issues and you guys fixed them so its only fair i return the favor
Member
Posts: 12,867
Joined: Mar 10 2004
Gold: 573.84
Jun 23 2009 07:31pm
i need some help here what is wrong

http://firehawks.web.surftown.dk/firehawks/don/

here is my file

<?php
Header ('Content-type: image/png');
Header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');
Header('Expires: Thu, 19 Nov 1981 08:52:00 GMT');
Header('Pragma: no-cache');

/******************************************************
* BASICS *
******************************************************/

// set some dimensions for future use
$expbar_width = 100;
$expbar_height = 25;

// create the image from a background jpg
$image = imagecreatefrompng('bg.png');

// set some colours for future use
$cool = imagecolorallocate($image, 81, 86, 96);
$red = imagecolorallocate($image, 255, 0, 0);
$yellow = imagecolorallocate($image, 255, 181, 53);

// set the background colour
// number or is top left pixel x, top left pixel y, bottom right pixel x, bottom right pixel y

// set the font and print text
$font = '/avqest.ttf';

/******************************************************
* LOAD DATA *
******************************************************/

// Create an array for determining the class you play.
// In the XML this is saved as an int number, the conversion is shown below.
$class_name = array( -1 => 'None',
0 => 'Fighter',
1 => 'Barbarian',
2 => 'Rogue',
3 => 'Magician',
4 => 'Guardian',
5 => 'Samurai',
6 => 'Paladin',
7 => 'Monk',
8 => 'Ninja',
9 => 'Warlock',
10 => 'Headhunter',
11=> 'Alchemist');

// load xml data in vars

// This is where you load your own info from the xml d2jsp gives. This is a PHP5 only command!
$data = simplexml_load_file('http://ladderslasher.d2jsp.org/xmlChar.php?i=256293');
$name = $data->name;
$kills = $data->kills;
$class = $class_name[(int)$data->classid];
$exp = $data->exp;
$level = $data->level;
$hpmax = $data->hpmax;
$mqpasses = $data->mqpasses;
$mqattempts = $data->mqattempts;
$exp = (int)$exp;
$percent = calcExpPercent($exp);
$brpixelX = calcBrPixelX($exp,$expbar_width);

// Create an expbar with bg 'cool' color and the cover of your level in red.
imagefilledrectangle($image, 180, 59, 280, 71, $cool);
imagefilledrectangle($image, 180, 59, $brpixelX, 71, $red);


/******************************************************
* TEXT PART *
******************************************************/

//Example ; ImageTTFText ($image, textsize, angle, right indent, down indent, color, font, "text");

// EXP bar text
ImageTTFText ($image, 9, 0, 122, 69, $yellow, $font, "To Level: ");
ImageTTFText ($image, 9, 0, 220, 69, $yellow, $font, $percent."%");

//show name
ImageTTFText ($image, 9, 0, 122, 33, $yellow, $font, "HC Name: ");
ImageTTFText ($image, 9, 0, 180, 33, $red, $font, $name);

//show class
ImageTTFText ($image, 9, 0, 280, 33, $yellow, $font, "Class: ");
ImageTTFText ($image, 9, 0, 320, 33, $red, $font, $class);

// show lvl
ImageTTFText ($image, 9, 0, 122, 45, $yellow, $font, "Level: ");
ImageTTFText ($image, 9, 0, 162, 45, $red, $font, $level);

//show experience
ImageTTFText ($image, 9, 0, 180, 45, $yellow, $font, "Experience: ");
ImageTTFText ($image, 9, 0, 250, 45, $red, $font, $exp);

// show kills
ImageTTFText ($image, 9, 0, 312, 45, $yellow, $font, "Kills: ");
ImageTTFText ($image, 9, 0, 352, 45, $red, $font, $kills);

// Show HP max
ImageTTFText ($image, 9, 0, 122, 57, $yellow, $font, "HP: ");
ImageTTFText ($image, 9, 0, 145, 57, $red, $font, $hpmax);

// SHow MQ passen and attempts
ImageTTFText ($image, 9, 0, 242, 57, $yellow, $font, "MQ passes/attempts: ");
ImageTTFText ($image, 9, 0, 357, 57, $red, $font, $mqpasses."/".$mqattempts);

// Show useless shizzle
ImageTTFText ($image, 9, 0, 122, 82, $yellow, $font, "-------------------------------------");
ImageTTFText ($image, 9, 0, 122, 95, $red, $font, "GoT-Guild LadderSlasher Player | Bring ce GPs!");

// output and destroy
imagepng($image);
imagedestroy($image);


/******************************************************
* FUNCTIONS *
******************************************************/

/***
* calculate the exp bar width.
***/
function calcBrPixelX($input,$xpbar_width)
{
$temp1 = fmod($input,1000000);
$temp1 = ($temp1/1000000);
$temp1 = $temp1 * $xpbar_width;
$temp1 = $temp1 + 180;

return (int)$temp1;
}

/***
* Calculate the percentage of level done
***/
function calcExpPercent($input)
{
$temp1 = fmod($input,1000000);
$temp1 = ($temp1/1000000);
$temp1 = $temp1 * 100;

return (int)$temp1;
}

?>
Go Back To Ladder Slasher Topic List
Prev1444546474860Next
Add Reply New Topic New Poll