Jump to content

Saving image resource onto subdirectory


Joshua4550

Recommended Posts

Hey.

 

I'm just wondering what would be the most logical or most efficient way to save an image resource that has been constructed on say the www. to a subdirectory or on another webserver?

 

For eg

 

The script on www.example.com constructs an image using the GD library from image1.png and image2.png.

It has now got the final image resource for what's been constructed.

 

I now want to save this image onto images.example.com

 

How would you suggest?

Link to comment
Share on other sites

then all you can do is inside that subdomain add a upload script which works of some $_REQUEST field that holds the data of bytes? i'm guessing..

 

then call the upload script using php with proper parameters but yah i guess someone else who understands this more will help you out.

 

Haha yah it's similar to my needs too only i need a txt file not a image.. strange how phpfreaks forum works.. every week i ask a question there is atleast a few similar to my needs questions

Link to comment
Share on other sites

I'm guessing you don't understand that i'm not uploading. I'm using the GD library to create an image resource stored in a variable from two existing images. But yeah.. I need to make it construct on the www but then save the image to a subdomain such as images.example.com

 

(saving using the imagepng() function btw)

 

Guessing I should pass the image resource through to another script located on the subdomain, just not sure how I would go about passing it through.

 

Thanks in advance to anyone who helps

Link to comment
Share on other sites

Hi

 

Depends where images.example.com is pointing.

 

Also possible that you could store the images somewhere outside of the web directory and then use a php script to serve them. This way you can control access to the images (ie, if the images are of sensitive graphs of info you probably only want certain users to see them).

 

All the best

 

Keith

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.