Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

How can I send data using HttpConnection?

$
0
0

1.

follow my instruction please.

(1) connect my website http://selfimg.com/secret/ (click)

(2) input textfields "1234" and "ABCD" and press 'Submit' Button

 

You will get 'BCGCA'. is that right?

 

 

2.

I want make this in Illustrator.

but I can't send "1234" and "ABCD" to website(http://selfimg.com/secret/process.php)

 

All I want is,

(1) Send "1234" and "ABCD" to http://selfimg.com/secret/process.php

(2) Get Decoded string "BCGCA"

 

 

 

please read my source code.

 

And talk to me what i missed.

 

 

 

 

 

////////////////////////////////////////////////////////////////////////////////////////// //////////////////

 

var libPath = "C:/Program Files/Adobe/Adobe Bridge CS3"

if( webaccesslib == undefined ) {

if( Folder.fs == "Windows" ) {

  var pathToLib = libPath + "/webaccesslib.dll";

} else {

  var pathToLib = libPath + "/webaccesslib.bundle";

  // verify that the path is valid

}

var libfile = new File( pathToLib );

var webaccesslib = new ExternalObject("lib:" + pathToLib );

}

 

 

//posting a string

var http = new HttpConnection("http://selfimg.com/secret/process.php" ) ;

http.request = "pass=1234" ;

http.request = "code=ABCD" ;

http.method = "POST"

http.execute() ;

 

 

////////////////////////////////////////////////////////////////////////////////////////// //////////////////

 

 

Thank you. and Happy new year.


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>