I want to simulate the following form and get the xml response:
<form action="https://s7ugc3.scene7.com/ugc/image?op=upload&upload_token=<?php //echo CDN::getS7Token(); ?>&company_name=usineadesign" method="post" enctype="multipart/form-data">
<p>
Formulaire d'envoi de fichier :<br />
<input type="file" name="image" /><br />
<input type="submit" value="Envoyer le fichier" />
</p>
</form>
The picture is on the server and I have an easy access to its path ! I want to create a function that would look like that
uploadtoscen7($path_to_image)
{
...
return $url;
}
Thanks to anyone who could help me !
I suggest you use cURL to post to remote HTTP server. You’ll need to set the POSTDATA accordingly. I use this function to send/get data from HTTP server:
You should be able to then call it like this: