File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7070 'rd.method_type_mode ' => $ _REQUEST ['rd_method_type_mode ' ]
7171);
7272
73- // use key 'http' even if you send the request to https://..
74- $ options = array (
75- 'http ' => array (
76- 'header ' => "Content-type: application/x-www-form-urlencoded \r\n" ,
77- 'method ' => 'POST ' ,
78- 'content ' => http_build_query ($ payload )
79- )
80- );
81- $ context = stream_context_create ($ options );
82- $ result = file_get_contents ($ url , false , $ context );
83-
84- // false, because we receive redirect
85- if ($ result === FALSE ) {
73+ $ curl = curl_init ();
74+ curl_setopt ($ curl , CURLOPT_URL , $ url );
75+ curl_setopt ($ curl , CURLOPT_POST , 1 );
76+ curl_setopt ($ curl , CURLOPT_POSTFIELDS , http_build_query ($ payload ));
77+ $ return = curl_exec ($ curl );
78+ curl_close ($ curl );
79+ if ($ return == "OK " ) {
8680 header ("Location: index.php?aframe=true&model= $ model&setup=web_a-frame/default&srcDir=data-gen " );
8781 die ();
8882}
You can’t perform that action at this time.
0 commit comments