What's new

PHP problem

Lex

New member
Like you know my avatar can change hairecuts by refreshing :p but i found it somewhere on the internet and i want to put it on my own webspace so i'm sure i won't lose it if the site goes down, i downloaded all the pictures :) and wrote a simple php script, it works if i follow the link but if i change it to my avatar it shows me a red cross :( .
Can anybody help me?
The original link is http://www.ookonline.com/images/random/ook....php?avatar.gif

Here is my code:

PHP:
<?php
$dir_path = "http://lexavatar.clawz.com";
$file_path = "/avatars/";
$ext = ".gif";
$rand = rand(1,64);

   print "<img src=".$dir_path.$file_path.$prefix.$rand.$ext.">";

?>

Here is the link to my webspace : http://lexavatar.clawz.com
 

The Khan Artist

Warrior for God
To do that, you would have to have your script actually return the file, intead of an img tag. It's quite possible, but I've never personally done it. Basically, you want to spit out some headers (that's the hard part - finding all the necessary headers to print), then then open the file and output it.
 

Slougi

New member
The Khan Artist said:
To do that, you would have to have your script actually return the file, intead of an img tag. It's quite possible, but I've never personally done it. Basically, you want to spit out some headers (that's the hard part - finding all the necessary headers to print), then then open the file and output it.
No that won't work. As I said before, avatars are always stored locally, and because of that are static.
 

The Khan Artist

Warrior for God
Slougi said:
No that won't work. As I said before, avatars are always stored locally, and because of that are static.

Oh, yeah. Sorry, I totally forgot that part. :p

Anyways, it would still be great for a sig.
 
OP
Lex

Lex

New member
The Khan Artist said:
Oh, yeah. Sorry, I totally forgot that part. :p

Anyways, it would still be great for a sig.

it worked with the one on ookonline.com, on the temp. emutalk ;)but i want it on my own host
:happy: can somebody help me anyway (to use it on other sites)
 
OP
Lex

Lex

New member
Doomulation said:
:w00t:
There's lots of sites out there that has free shoting! One example is angelcities.com.

i didn't ask for a host:doh:
 
OP
Lex

Lex

New member
The Khan Artist said:
To do that, you would have to have your script actually return the file, intead of an img tag. It's quite possible, but I've never personally done it. Basically, you want to spit out some headers (that's the hard part - finding all the necessary headers to print), then then open the file and output it.

how do i do that?
 
OP
Lex

Lex

New member
Doomulation said:
Seemed like he needed a host for it, that you could help to find one or something :doh:

If you read my first post you can see i already have one :doh: , i need help woth the php script in the first post :)
 

Top