TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-01-2009, 05:38 PM   #1 (permalink)
The Wanderer
 
Join Date: Feb 2009
Posts: 9
Thanks: 0
chikooo is on a distinguished road
Default adding a php link me code using an image as the link

is there a way to make a link me code on php using an image as the link.
also if i put some images on a folder and then a php script will place them on the document and then a next link will appear to show the next image. and show the text box with the link me code
chikooo is offline  
Reply With Quote
Old 03-02-2009, 03:53 AM   #2 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

So you want to run PHP on the extension of an image file? So when a user goes to image.jpg, they actually go to a script? There is no way with straight PHP to do this, your options are to MIME types to process the image extension you want as PHP, your other is to use mod_rewrite to run a PHP file for it.
__________________

Village Idiot is offline  
Reply With Quote
Old 03-02-2009, 02:18 PM   #3 (permalink)
The Wanderer
 
Join Date: Jan 2009
Posts: 7
Thanks: 0
Cappuccino is on a distinguished road
Default

by mod_rewrite

RewriteRule ^.*\.(bmp|tif|gif|jpg|jpeg|jpe|png)$ path_to_file.php
Cappuccino is offline  
Reply With Quote
Old 03-02-2009, 03:12 PM   #4 (permalink)
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

or using forcetype:
Code:
 <Filesmatch ".*\.(bmp|tif|gif|jpg|jpeg|jpe|png)">
   ForceType application/x-httpd-php
 </Filesmatch>
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a gallery class Tanax Advanced PHP Programming 25 02-19-2013 04:25 AM
Image Reflections in PHP Rendair Advanced PHP Programming 17 11-30-2011 08:41 AM
PHP Compressor Kalle Script Giveaway 8 05-28-2008 12:14 AM
Basic image link problem. Nor XHTML, HTML, CSS 7 03-25-2008 07:57 PM
Adding Images to a database from a folder Rendair Advanced PHP Programming 3 01-13-2008 07:40 PM


All times are GMT. The time now is 03:42 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design