RE: Idea on the topic of large pictures and hosting restrictions
This post is a response to the idea presented in this topic
The bottom line: you are the owner of the site and you need to resize the image uploaded by the user, but you do not have enough opportunities for this.
Solution: We make a “proxy” for you which does everything for you and gives the result to your script.
How to use:
In the image fill form, you write something like the following , where sjpg.ru/remoteupload.php is our proxy; destination - this is your script to which we will fill the image in the Image field, it will also receive all fields of the request message that the user will send to us (this is how the session can be sent); redirecturl - here the server will send the user after the download is completed,
but most likely before the picture gets to your server .
in this example, I upload a picture to my own website and send the user to Yandex.
That's basically it.
The service is very crude and is now hosted at the state shared hosting. If there is interest, we will transfer it to Maskva at the airborne forces, for example.
The problem is quite specific and maybe there will be not so many fans.
Try and be sure to write reviews.
upd :
An example of php code that uploads a picture for a session and then displays it for a user with this session. This code is just a demonstration, don’t do it on production :) You can try this thing as a client at c2009.ru/test.php
, there is exactly the same code, only the domain is different.
The bottom line: you are the owner of the site and you need to resize the image uploaded by the user, but you do not have enough opportunities for this.
Solution: We make a “proxy” for you which does everything for you and gives the result to your script.
How to use:
In the image fill form, you write something like the following , where sjpg.ru/remoteupload.php is our proxy; destination - this is your script to which we will fill the image in the Image field, it will also receive all fields of the request message that the user will send to us (this is how the session can be sent); redirecturl - here the server will send the user after the download is completed,
but most likely before the picture gets to your server .
in this example, I upload a picture to my own website and send the user to Yandex.
That's basically it.
The service is very crude and is now hosted at the state shared hosting. If there is interest, we will transfer it to Maskva at the airborne forces, for example.
The problem is quite specific and maybe there will be not so many fans.
Try and be sure to write reviews.
upd :
An example of php code that uploads a picture for a session and then displays it for a user with this session. This code is just a demonstration, don’t do it on production :) You can try this thing as a client at c2009.ru/test.php
if(isset($_FILES['Image'])&&isset($_POST['imageId'])){
move_uploaded_file($_FILES['Image']['tmp_name'], "images/".intval($_POST['imageId']).".jpg");
}
else{
session_start();
if(isset($_SESSION['imageId'])) {
echo '
';
}
else {
$_SESSION['imageId']= rand();
?>
}
}
?>
, there is exactly the same code, only the domain is different.