Go to Post Since this thread doesn't seem to have quite enough numbers yet, here are some more. - William Frost [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-02-2003, 18:53
Trashed20's Avatar
Trashed20 Trashed20 is offline
Boom, Shawalala Boom!
#0862 (PCEP Lighting)
 
Join Date: Jan 2002
Location: Canton, MI
Posts: 528
Trashed20 will become famous soon enough
Send a message via AIM to Trashed20
Question PHP image output

I've seen a couple of people's signatures with random pictures appearing due to the magic of php. I've done some searching but can't find a mechanism that will output it in the way you guys are doing. Anyone feel like putting up some code for the picture thing or at least explainging whats going on? Also, do you need the GD lib to do it?
__________________
Where has all the fun gone?
  #2   Spotlight this post!  
Unread 05-02-2003, 19:06
Jeremy_Mc's Avatar
Jeremy_Mc Jeremy_Mc is offline
GitHubber
no team
Team Role: Mentor
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Orlando, FL
Posts: 496
Jeremy_Mc will become famous soon enoughJeremy_Mc will become famous soon enough
i can give you some sample code if you PM me...

and to answer your question, yes you have to have GD unless you don't want the images to be made at runtime.

*jeremy
__________________
GitHub - Collaborate on code, documentation, etc. - http://github.com
  #3   Spotlight this post!  
Unread 05-02-2003, 19:10
AJ Quick's Avatar
AJ Quick AJ Quick is offline
Your Attention Please
FRC #0006 (CogSquad)
Team Role: Alumni
 
Join Date: Oct 2002
Rookie Year: 2001
Location: Minnesota
Posts: 464
AJ Quick has a spectacular aura aboutAJ Quick has a spectacular aura about
Its simple..

Even simpler, if you use a bunch of pre-made images, that are rotated at random.
__________________
-AJ Quick (Alum on Team 6)
http://www.HHSRobotics.com/

Place your attention entirely on my voice and try to ignore all the others. It is important to be able to focus on a single source of information while blocking out all the other things competing for your attention.
  #4   Spotlight this post!  
Unread 05-02-2003, 22:06
Jack's Avatar
Jack Jack is offline
FIRST Scouting Network
AKA: Andrew Schenk
FRC #0201 (The FEDS)
Team Role: Alumni
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Rochester Hills
Posts: 643
Jack is a jewel in the roughJack is a jewel in the roughJack is a jewel in the rough
Send a message via AIM to Jack
a little confused.

Does the img tag let you goto a *.php located on your server? - Since i know brandon ain't going to let us have php in our sig.
__________________
Team 201 - 2003 Great Lakes Semifinalists & 2003 Archimedes Division Finalists :|: Webmaster of www.feds201.com -> FBI Scouting
Winner of The 2003 ChiefDelphi Web Award for: User That Started The Most Non Chit Chat Threads
Winner of: 2003 FIRST Ventures with 5451.68 End Points

All about me: http://knehcsa.vze.com
**Check out the New FIRST Scouting Network**
  #5   Spotlight this post!  
Unread 05-02-2003, 22:09
Jeremy_Mc's Avatar
Jeremy_Mc Jeremy_Mc is offline
GitHubber
no team
Team Role: Mentor
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Orlando, FL
Posts: 496
Jeremy_Mc will become famous soon enoughJeremy_Mc will become famous soon enough
Quote:
Originally posted by Jack
a little confused.

Does the img tag let you goto a *.php located on your server? - Since i know brandon ain't going to let us have php in our sig.
yes. check out this script:
http://pscode.com/vb/scripts/ShowCod...d=209&lngWId=8

Have fun with it and if you neep help, PM me

*jeremy
__________________
GitHub - Collaborate on code, documentation, etc. - http://github.com
  #6   Spotlight this post!  
Unread 05-02-2003, 22:09
Trashed20's Avatar
Trashed20 Trashed20 is offline
Boom, Shawalala Boom!
#0862 (PCEP Lighting)
 
Join Date: Jan 2002
Location: Canton, MI
Posts: 528
Trashed20 will become famous soon enough
Send a message via AIM to Trashed20
yes, his img tag is like < img src="mywierdpicturesigthing.php" > and it outputs a random picture. You would need the script on your own server to parse it. I just don't know how it works!
__________________
Where has all the fun gone?
  #7   Spotlight this post!  
Unread 05-02-2003, 22:43
evulish's Avatar
evulish evulish is offline
1010100
AKA: Grant Harding
#0084 (WATTNESS (bot: Chuck))
Team Role: Alumni
 
Join Date: Jul 2002
Location: Towanda/Wysox, PA
Posts: 1,434
evulish is just really niceevulish is just really niceevulish is just really niceevulish is just really nice
Send a message via AIM to evulish
If I had to take a whack at this, I'd just send the HTTP headers back to make it looks like it's a JPG rather than a txt/html file. Then you have the code randomly select an image in a directory, open it, then send all the binary from the image to the client. (Or use GD to make your own, I guess.,..unless you want to be REALLY cool and put JPEG compression and stuff in your program )
__________________
I'm a professional web developer. I'm good with PHP, Perl, Java/JSP, some RoR, XML, Javascript (AJAX as well), (x)HTML, CSS, etc.. Validated code is good; fully cross-browser code is better (you comply to your users and the software they use, not the other way around. Sorry!)
  #8   Spotlight this post!  
Unread 05-02-2003, 23:06
Brandon Martus's Avatar Unsung FIRST Hero
Brandon Martus Brandon Martus is offline
busy.
AKA: B. Slash Kamen
no team
 
Join Date: May 2001
Rookie Year: 1998
Location: Nevada, TX USA
Posts: 5,271
Brandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond repute
Send a message via ICQ to Brandon Martus Send a message via AIM to Brandon Martus Send a message via Yahoo to Brandon Martus
My signature uses the GD Libraries.

Code:
$im = imagecreatefromjpeg ('/path/to/my/blank/file.jpg');
$black = imagecolorallocate ($im, 0, 0, 0);
imagettftext ($im, 12, 0, 17, 28, $black, "/path/to/my/font/tahoma.ttf", "This is what you see on the image");

header ("Content-type: image/jpeg");
imagejpeg ($im);
exit;
This is a stripped down version of the code that powers my signature.

Last weekend I created a neat little image generator with the GD libraries. I'll post something about it when the whole project is complete. Some of you may remember the early days of the project.
__________________
Brandon Martus
e-mail
  #9   Spotlight this post!  
Unread 06-02-2003, 09:50
Joe Matt's Avatar
Joe Matt Joe Matt is offline
Wake Up Get Up Get Out There
no team
 
Join Date: Dec 2001
Rookie Year: 2001
Location: CAK
Posts: 5,067
Joe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond repute
As for my sig, this is a neat thing I got off of a site. I'm going to get the php and then edit the picture and post it on my server.

BTW, I KNOW where you live....
__________________
  #10   Spotlight this post!  
Unread 06-02-2003, 09:58
Brandon Martus's Avatar Unsung FIRST Hero
Brandon Martus Brandon Martus is offline
busy.
AKA: B. Slash Kamen
no team
 
Join Date: May 2001
Rookie Year: 1998
Location: Nevada, TX USA
Posts: 5,271
Brandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond repute
Send a message via ICQ to Brandon Martus Send a message via AIM to Brandon Martus Send a message via Yahoo to Brandon Martus
Quote:
Originally posted by JosephM
BTW, I KNOW where you live....
Louisville, Colorado?.... I dont think so..
__________________
Brandon Martus
e-mail
  #11   Spotlight this post!  
Unread 06-02-2003, 10:35
Joe Matt's Avatar
Joe Matt Joe Matt is offline
Wake Up Get Up Get Out There
no team
 
Join Date: Dec 2001
Rookie Year: 2001
Location: CAK
Posts: 5,067
Joe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond reputeJoe Matt has a reputation beyond repute
Quote:
Originally posted by Brandon Martus
Louisville, Colorado?.... I dont think so..
Errr... Well I SORTA know the GENERAL AREA you LIVE!!!



It says that at home I'm in Massachusetts.

And I looked at the early project, SWEET!!!

LONG LIVE LISTEN TO!!!
__________________

Last edited by Joe Matt : 06-02-2003 at 10:38.
  #12   Spotlight this post!  
Unread 06-02-2003, 11:05
Gadget470's Avatar
Gadget470 Gadget470 is offline
A Fire Outside
AKA: Brandon Joerges
no team (Alpha Omega)
Team Role: Alumni
 
Join Date: Jan 2002
Rookie Year: 2000
Location: Madison Heights, MI
Posts: 1,000
Gadget470 is a jewel in the roughGadget470 is a jewel in the roughGadget470 is a jewel in the roughGadget470 is a jewel in the rough
Send a message via ICQ to Gadget470 Send a message via AIM to Gadget470
When I'm at school your signature says i'm 40 minutes (by car) away from where I really am, at home I'm in another state (IL) which is about 4 1/2 hours away.

The basic context of your script is a tracert matched with locations. It comes down to where the main router is for whatever service you use is at. Or the closest readable router. (Some networks hide their IP addresses from ping/tracert)
  #13   Spotlight this post!  
Unread 06-02-2003, 12:45
Brandon Martus's Avatar Unsung FIRST Hero
Brandon Martus Brandon Martus is offline
busy.
AKA: B. Slash Kamen
no team
 
Join Date: May 2001
Rookie Year: 1998
Location: Nevada, TX USA
Posts: 5,271
Brandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond repute
Send a message via ICQ to Brandon Martus Send a message via AIM to Brandon Martus Send a message via Yahoo to Brandon Martus
Quote:
Originally posted by JosephM
Errr... Well I SORTA know the GENERAL AREA you LIVE!!!
Well... You did get the country right, I suppose. Last time I checked, Colorado & Michigan were 2 timezones apart.
__________________
Brandon Martus
e-mail
  #14   Spotlight this post!  
Unread 06-02-2003, 14:45
Trashed20's Avatar
Trashed20 Trashed20 is offline
Boom, Shawalala Boom!
#0862 (PCEP Lighting)
 
Join Date: Jan 2002
Location: Canton, MI
Posts: 528
Trashed20 will become famous soon enough
Send a message via AIM to Trashed20
hrm, listen-to images for use in any application..... very interesting indeed i'd use it
__________________
Where has all the fun gone?
  #15   Spotlight this post!  
Unread 06-02-2003, 14:47
Brandon Martus's Avatar Unsung FIRST Hero
Brandon Martus Brandon Martus is offline
busy.
AKA: B. Slash Kamen
no team
 
Join Date: May 2001
Rookie Year: 1998
Location: Nevada, TX USA
Posts: 5,271
Brandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond repute
Send a message via ICQ to Brandon Martus Send a message via AIM to Brandon Martus Send a message via Yahoo to Brandon Martus
VERY dynamic.

I cant wait.


Plus lots of music listening tracking & stats.
__________________
Brandon Martus
e-mail
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FREE web design, php, and 3ds max classes Jeremy_Mc General Forum 0 31-01-2003 15:42
php vs. perl Jack Website Design/Showcase 20 29-12-2002 17:01
PHP File Uploading Scripts Ian W. Chit-Chat 15 15-09-2002 17:41
What's better, PERL/cgi or PHP/my_sql? mikefrei Programming 10 27-05-2002 22:50
Rookie Programmer has question about the default code DanL Programming 3 26-01-2002 19:59


All times are GMT -5. The time now is 00:24.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi