Get string from web through dot net

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  07 July 2018
Get string from web through dot net

Hello, I'm trying to get a simple sting via PHP to maxscript. If you goto you should get a simple page with a sting of "1.10".

I'm sort of list on this. What do I need to do to fetch this data?

ConNet = ((dotnetClass "System.Net.WebRequest").Create "").GetResponse()
  07 July 2018
looks like this works but I don't like this way...

FN Get_Ver = (
   if internet.CheckConnection url:"" force:true == true then(
      rollout httpSock "httpSock" width:0 height:0 (activeXControl port "MSXML2.ServerXMLHTTP" setupEvents:false releaseOnClose:false);
      createDialog httpSock pos:[-100,-100];destroyDialog httpSock;   
      gethttp.SetTimeouts timeouts timeouts timeouts timeouts "GET" "" false
      return gethttp.responseText
      return "0.0"
Ver = Get_Ver()
  07 July 2018

request = (dotnetClass "System.Net.WebRequest").Create ""
response = request.GetResponse()
dataStream = response.GetResponseStream()
reader = dotnetobject "System.IO.StreamReader" dataStream
data = reader.ReadToEnd()

maybe ?
  07 July 2018
the better one:

client = dotnetobject "System.Net.WebClient"
client.DownloadString ""
  07 July 2018
the bigger problem is to check that url exists, valid, and you can connect to it
  07 July 2018

This should check if you have internet and URL from...

internet.CheckConnection url:"" force:true == true

or am I wrong about this function
reply share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 03:26 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.