473,386 Members | 1,803 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Sending an image to a browser

I have an image that resides in a directory that isn't accessible on the
web, however I want to be able to send that image via PHP without making
it directly accessible on the web. The URL would be something like this
... image/username/image-name.

The reason I want to do this is so that I can do authentication on the
user before having it pushed to the browser. How would I be able to do this?
Jul 27 '07 #1
2 3898
On 27 Jul, 11:43, Vernon Wenberg III <vwenb...@gmail.comwrote:
I have an image that resides in a directory that isn't accessible on the
web, however I want to be able to send that image via PHP without making
it directly accessible on the web. The URL would be something like this
.. image/username/image-name.

The reason I want to do this is so that I can do authentication on the
user before having it pushed to the browser. How would I be able to do this?
http://uk.php.net/manual/en/function.readfile.php

Jul 27 '07 #2
Rik
On Fri, 27 Jul 2007 12:50:08 +0200, Captain Paralytic
<pa**********@yahoo.comwrote:
On 27 Jul, 11:43, Vernon Wenberg III <vwenb...@gmail.comwrote:
>I have an image that resides in a directory that isn't accessible on the
web, however I want to be able to send that image via PHP without making
it directly accessible on the web. The URL would be something like this
.. image/username/image-name.

The reason I want to do this is so that I can do authentication on the
user before having it pushed to the browser. How would I be able to do
this?

http://uk.php.net/manual/en/function.readfile.php
And don;t forget to send the right mime-type headers.

(BTW, I assume you allready have a script that determines wether a user is
logged in or not?)

--
Rik Wasmus
Jul 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Lee | last post by:
I am having a problem returning an image that I got from SQL Server from within an ASP page that got requested from a VC++ application. Specifically, within my application, I make an HTTP call to...
2
by: dave | last post by:
Hi I'm using CDO message to send email thru asp code. Below is sample code... body = body & "<tr><td colspan=2><img src=images/contacts_5.jpg></td></tr>" I'm just confused why its not...
4
by: Jim Michaels | last post by:
<?php include 'dbinc.php'; $result = mysql_query("SELECT image,mime_type FROM photos WHERE image_id=".intval($_GET), $link) or die("MyErr:".mysql_error()); if ($row = mysql_fetch_assoc($result))...
2
by: nishi.hirve | last post by:
Hello, I am writing 1 client-server application in which I have written my server in C on linux system and client in C#. My server is sending image bytes of that image size to the client....
2
by: maxime_phan | last post by:
Hello everyone, I'm trying to make a webcam software with python, pil library and enet (networking) Now I have in the client my pil image get from webcam, ready to be send by network. I do...
1
by: Lakshmanakumar | last post by:
hi, I had send a link in email . when user open the email click the link on it open mypage.asp. On that page i show a thumb nail image when user click on he got an enlarged image in new...
1
by: RKalai | last post by:
hi, i have picture in a image box and i want to send the picture to printer. i tried with paintpicture.but i m not able to do.can anyone specify the code to perform the same. thanks in advance...
7
by: hsegoy1979 | last post by:
Dear All Iam using file upload control and i want to display image in another pop up page .But image is not displaying in image control iam sending image path thru querystring . here is my code ...
2
by: sandeepdhankar10 | last post by:
hi experts, i need ur help. i want to send a image via http post along with the form data i.e image name etc to a specified url .. which is the url of a jsp servelt. NOTE:- I am sending...
2
by: ksheerasagar17 | last post by:
Hello All, Scenario: Sending an image through webservice as byte array to an Java webservice. The Problem1: The webservice method image property expects (data type) SByte rather than Byte...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.