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
https://forums.phpfreaks.com/topic/209458-saving-image-resource-onto-subdirectory/
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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.