Page 3 of 5
Creating a dynamic signature
Posted: Fri Oct 03, 2003 12:36 pm
by tw2
red
i`m reading through this mess man
only one way this will get fixed..
you need to sit down and start over from the begining
and post it from the start. on how to .
if everyone keeps trying what you posted it will never work as you know .
a few steps were left out .i think you got in a little bit of a rush.
oh well a good winter time project..
Archived topic from Iceteks, old topic ID:1293, old post ID:12094
Creating a dynamic signature
Posted: Fri Oct 03, 2003 1:59 pm
by Red Squirrel
tw2 wrote: red
i`m reading through this mess man
only one way this will get fixed..
you need to sit down and start over from the begining
and post it from the start. on how to .
if everyone keeps trying what you posted it will never work as you know .
a few steps were left out .i think you got in a little bit of a rush.
oh well a good winter time project..
All the article was really intended for was to explain the concept - not the actual code. I just used that code for an example, but you can use anything. As long as you have a
random <?php header("location: ");?> it makes it work.
I think the only problem in this case is a script error. If you copy and paste my script I can't see why it does not work.
Archived topic from Iceteks, old topic ID:1293, old post ID:12095
Creating a dynamic signature
Posted: Fri Oct 03, 2003 2:27 pm
by tw2
yes but, red.
the way it was posted.that is what they think it the code step by step
on how to make it
Archived topic from Iceteks, old topic ID:1293, old post ID:12098
Creating a dynamic signature
Posted: Fri Oct 03, 2003 3:07 pm
by Red Squirrel
Might re-do it later. But the thing is, if it's done correctly it should work first shot, so not really sure what to add.
Archived topic from Iceteks, old topic ID:1293, old post ID:12107
Creating a dynamic signature
Posted: Mon Oct 06, 2003 1:29 pm
by wldkos
Red Squirrel wrote: Might re-do it later. But the thing is, if it's done correctly it should work first shot, so not really sure what to add.
So you mean that there were other steps that you left out? I definately think that you should re-write it, I dont see why you shouldn't.
Archived topic from Iceteks, old topic ID:1293, old post ID:12198
Creating a dynamic signature
Posted: Mon Oct 06, 2003 3:08 pm
by Red Squirrel
No steps where left out, but just a few obvious ones I might of not put enough details on. Now that I think of it, I never actually emailed the other tech sites to get this posted everywhere, so I'll redo it and email them after.
Archived topic from Iceteks, old topic ID:1293, old post ID:12202
Creating a dynamic signature
Posted: Mon Oct 06, 2003 11:33 pm
by Red Squirrel
Ok, I just rewrote some parts, try it again and let me know if it works. I want to make sure I did not leave anything out and if you get it to work I'll send it over to a few hundred tech sites for posting. I never even did it when I first submitted it anyway. Almost 1000 hits is pretty good for something that's hardly been around.
http://www.iceteks.com/articles/db.php/act...icle/dynsig/p/1
Archived topic from Iceteks, old topic ID:1293, old post ID:12208
Creating a dynamic signature
Posted: Tue Oct 07, 2003 9:06 pm
by wldkos
even with you re-writing the article I think the first one had more information. I still am not getting this right and I think it's because you might be leaving out the stuff that you think is obvious, and it's not to me.
Archived topic from Iceteks, old topic ID:1293, old post ID:12228
Creating a dynamic signature
Posted: Tue Oct 07, 2003 9:14 pm
by Red Squirrel
Nothing is left out. It's as complicated as it gets. What is it doing? What's the link to the image, I'll check it...
Archived topic from Iceteks, old topic ID:1293, old post ID:12230
Creating a dynamic signature
Posted: Tue Oct 14, 2003 8:18 am
by Red Squirrel
That's most likely a result of the .htaccess file not working properly or something. It should have
ForceType application/x-httpd-php
and then the .jpg (php code) should go in the same folder.
Archived topic from Iceteks, old topic ID:1293, old post ID:12435
Creating a dynamic signature
Posted: Tue Oct 14, 2003 8:27 am
by wldkos
See I have everthing that you are saying, but it's just not working. Maybe I am going to try this on a different server besides mine, since I use a newer version of PHP and maybe the syntax changed?
Archived topic from Iceteks, old topic ID:1293, old post ID:12436
Creating a dynamic signature
Posted: Tue Oct 14, 2003 4:07 pm
by Red Squirrel
Could be... maybe put everything in a folder and send it to me and I'll check if it works on my host "as is". Maybe it's my version of php or something...
Archived topic from Iceteks, old topic ID:1293, old post ID:12438
Creating a dynamic signature
Posted: Tue Nov 18, 2003 9:04 pm
by Red Squirrel
Can you show me a link of what you mean?
Archived topic from Iceteks, old topic ID:1293, old post ID:14146
Creating a dynamic signature
Posted: Wed Nov 19, 2003 12:03 am
by Red Squirrel
It should read it as php but it should not be displaying anything but the image, what exactly do you get, just the php code? You should be getting the image.
Archived topic from Iceteks, old topic ID:1293, old post ID:14189
Creating a dynamic signature
Posted: Mon Dec 22, 2003 12:57 pm
by Chris Vogel
Is there a way to use the rand() function instead what you have done?
Maybe something like this:
Code: Select all
<?php
$random = rand(1,10);
header("Cache-Control: no-cache, must-revalidate, no-store");
header("Location: http://whatever/sig/sig$random.jpg");
?>
[code]
Assuming you have ten jpg images named correctly...
[color=#888888][size=85]Archived topic from Iceteks, old topic ID:1293, old post ID:15087[/size][/color]
Creating a dynamic signature
Posted: Mon Dec 22, 2003 6:54 pm
by Red Squirrel
Yep would work. I did not know about the rand command when I wrote that article, I use it allot in the cybervillage bank steal section and stuff.
Archived topic from Iceteks, old topic ID:1293, old post ID:15093
Creating a dynamic signature
Posted: Tue Dec 23, 2003 3:09 pm
by wldkos
[quote=takahita_tsukino] Is there a way to use the rand() function instead what you have done?
Maybe something like this:
Code: Select all
<?php
$random = rand(1,10);
header("Cache-Control: no-cache, must-revalidate, no-store");
header("Location: http://whatever/sig/sig$random.jpg");
?>
[code]
Assuming you have ten jpg images named correctly... [/quote]
damn you tak! You telling me the script can be that simple now? Figure it out red!
[color=#888888][size=85]Archived topic from Iceteks, old topic ID:1293, old post ID:15138[/size][/color]
Creating a dynamic signature
Posted: Tue Dec 23, 2003 5:56 pm
by Red Squirrel
That's IF you have the images named properly. If you have it like mine (a b c etc) then you need if statements for each one. But it's not more complicated, it's just more code.
Archived topic from Iceteks, old topic ID:1293, old post ID:15145
Creating a dynamic signature
Posted: Tue Dec 23, 2003 6:31 pm
by Chris Vogel
Red Squirrel wrote: That's IF you have the images named properly
Yep, as in sig7.jpg or sig10.jpg...
Archived topic from Iceteks, old topic ID:1293, old post ID:15146
Creating a dynamic signature
Posted: Wed Dec 24, 2003 2:55 pm
by wldkos
takahita_tsukino wrote: Red Squirrel wrote: That's IF you have the images named properly
Yep, as in sig7.jpg or sig10.jpg...
which is what I had, Someone make the script work and let me know, I can care less about renaming the pictures, just make sure it works, we have been trying to get this to work for a long time now..
Archived topic from Iceteks, old topic ID:1293, old post ID:15171
Creating a dynamic signature
Posted: Wed Dec 24, 2003 3:30 pm
by Red Squirrel
Use something like this:
Code: Select all
<?php
$random = rand(1,10);
header("Cache-Control: no-cache, must-revalidate, no-store");
header("Location: http://whatever/sig/sig".$random.".jpg");
?>
[code]
That should do it. Make sure the random 1,10 is the right numbers for what you have.
[color=#888888][size=85]Archived topic from Iceteks, old topic ID:1293, old post ID:15172[/size][/color]
Creating a dynamic signature
Posted: Wed Dec 24, 2003 6:23 pm
by Chris Vogel
".$random.".
Could you please explain why you did that?
Archived topic from Iceteks, old topic ID:1293, old post ID:15173
Creating a dynamic signature
Posted: Thu Dec 25, 2003 7:35 pm
by wldkos
how about just the whole code, I want to get this right.
Archived topic from Iceteks, old topic ID:1293, old post ID:15197
Creating a dynamic signature
Posted: Thu Dec 25, 2003 8:15 pm
by Red Squirrel
It tells php that it's a variable. For example, you have this:
$variable="text";
echo("$variablesome stuff");
output: $variablesome stuff
But if you use
echo($variable."some stuff");
output: textsome stuff
But I've also seen situations where the first example still outputs the variable, so either way is probably ok, but the second way is the better way to do it. It's just easier to read.
Archived topic from Iceteks, old topic ID:1293, old post ID:15202
Creating a dynamic signature
Posted: Sat Dec 27, 2003 2:42 pm
by Chris Vogel
Is there a way to use get a random letter? I guess I could do rand(1,26) and then pair up a number with a letter, but is there an easier way?
Archived topic from Iceteks, old topic ID:1293, old post ID:15246