Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6140137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:04:42+00:00 2026-05-23T18:04:42+00:00

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

  • 0

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 !

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:04:43+00:00Added an answer on May 23, 2026 at 6:04 pm

    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:

    function get_page_by_curl($searchUrl, $post=false, $postParams="")
    {
        print " " . $searchUrl;
        global $errMsg;
        //$userAgent = "Googlebot/2.1( http://www.googlebot.com/bot.html)"; 
        $userAgent = "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.9.0.2) Gecko/20121223 Ubuntu/9.25 (jaunty) Firefox/3.5 Robot";
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
        curl_setopt($ch, CURLOPT_URL, $searchUrl);
        curl_setopt($ch, CURLOPT_FAILONERROR, true);
        curl_setopt($ch, CURLOPT_HEADER, false);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($ch, CURLOPT_AUTOREFERER, true);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
        curl_setopt($ch, CURLOPT_NOPROGRESS, true);
        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
        if($post)
        {
             curl_setopt ($ch, CURLOPT_POST, true);
             curl_setopt ($ch, CURLOPT_POSTFIELDS, $postParams);
        }
        $htmlPage = false;
        do
        {
            $htmlPage = curl_exec($ch);
            $errno = curl_errno($ch);
            if($errno == 28)
            {
                print ".";
                flush();
                sleep(SLEEP_TIME);
            }
            elseif($errno == 7)
            {
                print "*";
                flush();
                sleep(SLEEP_TIME);
            }
            elseif($errno == 6)
            {
                print "+";
                flush();
                sleep(SLEEP_TIME);
            }
            elseif($errno != 0)
            {
                $errMsg = $errno . ": " . curl_error($ch);
            }
        }
        while(!$htmlPage && $errno == 28);
    
        return $htmlPage;
    }
    

    You should be able to then call it like this:

    $xml = get_page_by_curl($url, true, 'image=@/full/path/to/file&submit=Envoyer+le+fichier');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to simulate N-sided biased die? def roll(N,bias): '''this function rolls N dimensional
I want to reference a COM DLL in a .NET project, but I also
I want to simulate data changing in the model and having that data be
In an online manager game (like Hattrick ), I want to simulate matches between
I want to simulate in ruby my implementation of the map and reduce functions
Want to know what the stackoverflow community feels about the various free and non-free
Want my FireFox at work to be in sync with my FireFox at my
I want to loop over the contents of a text file and do a
I want to assign the decimal variable "trans" to the double variable "this.Opacity". decimal
I want to create a Java application bundle for Mac without using Mac. According

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.