With the help of the socket object to retrieve data from web application without the html files
I tried to use the socket object to retrieve data from a web application (I just control script version vs version online). So all I want to do is access http://hyle.io/version that returns me the current version of the application (such as a simple string) in order to compare it in my script and then notifies the user accordingly. I have just a few problems using the socket object. I used this code from the Adobe Javascript Tools Guide:
reply = "";
conn = new Socket;
// access Adobe’s home page
if (conn.open ("www.adobe.com:80")) {
// send a HTTP GET request
conn.write ("GET /index.html HTTP/1.0\n\n");
// and read the server’s reply
reply = conn.read(999999);
conn.close();
}
... that I then adapted as:
reply = "";
conn = new Socket;
if (conn.open ("hyle.io:80")) {
conn.write ("GET /version HTTP/1.0\n\n");
reply = conn.read(999999);
conn.close();
}
And here is what I get:
HTTP/1.1 400 Bad Request Content-Length: 225 Content-Type: text/html Server: Pagodabox-Routing-MeshBad Request
Your browser sent a request that this server could not understand.
Résultat : true
I don't know a lot about HTTP requests, but I wondered if it was related to the fact that I am not pointing to a specific HTML file and the type of request was wrong or if I should rather check if there is something wrong with my host?
The site/app is PHP and is hosted on PagodaBox if it helps.
Thanks in advance!
Hi Sebastien Lavoie,
It should work
var HTTPFile = function (url, port) {}
If (arguments.length == 1) {}
URL = arguments [0];
port = 80;
};
This.url = url;
This.port = port;
this.httpPrefix = this.url.match(/http:\/\//);
This.Domain = this.httpPrefix is nothing? This.URL.Split("/") [0] + ":" + this.port: this .url .split ("/") [2] +":" + this.port;
This.Call = ' GET ' + (this.httpPrefix == null? ' "). " http://" (+ this.url: this.url) + "HTTP/1.0\r\nHost: ' + (this.httpPrefix is nothing? "This.URL.Split("/ ") [0]: this .url .split (" / ") [2]) +" \r\nConnection: close\r\n\r\n ";
This.Reply = new String();
This.Conn = new Socket();
This.Conn.Encoding = "binary";
HTTPFile.prototype.getFile = {function (f)}
var typeMatch = this.url.match(/(\.) (\w{3,4}\b)/g);
If (this.conn.open (this.domain, "binary")) {}
This.Conn.Write (this.) Call);
This.Reply = this.conn.read (9999999999);
This.Conn.Close ();
} else {}
This.Reply = "";
}
(Return this.reply.substr(this.reply.indexOf("\r\n\r\n")+4);
};
}
Hyle var = new HTTPFile ("http://hyle.io/version");
Alert (hyle. GetFile());
And by the way, I like the idea of 'http://hyle.io'. Can you give me your email address, I want to learn more about this Web site.
Please send me an email to [email protected]
Tags: After Effects
Similar Questions
-
create the http client to retrieve data from web service
Hello
I am newbie on our webworks. I need to retrieve data from web service. How to connect to this service and analyzed. There is a tutorial that can help me get started with it.
Can any one advice me how can I start working with webworks on blackberry 10
Thanks for any help
In general, you will need to use an AJAX call to the server
It really depends on what the server returns as to how the information is easy to digest
JQuery provides a simple interface, and returns information easy to use
If you deal with things gets complicated XML according to namespace
If you look at the raw XML data and it goes something like fred: name you will have questions requiring an implementation of SAX - JSON is simple if you don't get that even if (nothing too confusing here)
If using an external data source JSON go if you have the choice
As examples go - just look to the top of JQuery Ajax [JSON / XML] and you will get where you're going quickly
SAX is MUCH harder because of the namespace - Dublin is the most common and same XML without namespace is not simple to handle, so avoid it if you can
-
In Muse, how do you define settings to publish the HTML files to a 'flat structure' as opposed to directories? With my software previous "Net objects Fusion" he settings under "Publish" to do this.
You can not. It's just how Muse works and makes the distinction between global and local by the elements of the page.
Mylenium
-
Need help to open two images with the same file with different exposures on the screen at the same time in the Photoshop creative cloud (in previous versions we could open two images of the same nef (raw) file and then combine them on the screen with the move tool. They have become a composite of two layers which could be developed further with the mask tool.
Hello
Please go to the preferences > workspace and uncheck the option 'open the document in the tabs '.
Now you can click on file and choose file > open and open the two images in two different windows which can be arranged side by side.
Thank you
-
Please help send an email with the html page in the body
I need an html page on the body of an email to send a blast to send to our customers.
HTML emails can be a bit complicated. You can design in Dreamweaver, but you shouldn't really have to send emails of mass through to your personal e-mail account (or your company account). Could you put blacklisted by spam filters in the company and make your pretty useless email addresses.
Mass emailings (more than a few hundred addresses) I use http://www.icontact.com.
You can build the email through their site (without DW) or you can import your DW html file to their service.
Some things to keep in mind with the HTML email...
1. the use of absolute links to the images and files on a server you control
2. use a limited amount of inline css (no external css or integrated)
3. specify in table based layouts, css support is spotty at best with email clients
4. the
will be eliminated a number of email clients don't rely not on what it is between theTags makes to your recipients5. do not use an email only to images. HTML text is very important to keep from being labeled as spam, make the secondary images in the message, many email clients will not download images without permission of the user
6. include a link to unsubscribe so people can get off your list
There are more things to watch, but who are the biggest. Here are some other good info: http://alt-web.com/Articles/HTML-Emails.shtml
-
transfer bookmarks in the HTML file to another computer with installed bookmarks
I try to transfer my favorites from one computer to another, which already has some of them. I tried "delete all bookmarks except for backups" FF safe mode and then import the HTML file, but all bookmarks in the folder is there, it does not have the bookmarks toolbar, which is the most important part of the structure for me. The correct toolbar is in the list of bookmarks, but it doesn't show up when I open FF. I tried to delete the stuff in the bookmarks bar which is at the top of the list and copy the stuff in the toolbar I want the toolbar now empty, but that did ' t work either.
I thank God and the developers for restoration!I hope this is clear enough. Thanks for any help
SchroThank you, cor - el. It worked well, but it is much more difficult than the last time that I transferred bookmarks (can't remember how many FF there are versions that was, but it was a combination)-at this time, I just sent the file bookmarks.html to a computer to me to another and then replace the file in the second computer with that of the first. But at this time the second computer was new and had no Favorites to start with.
It sounded so much more easy to do import/export function... Well, all's well that ends well, so all is well now. Sorry I took so long in its reply, had to go into my other computer last night and had no time to work on this one there until this afternoon.
Thanks again for your help.
Schro
-
Problem with the executable files
Hello all, I need a help from you...
I use LV 2009 SP1 Professional Development Suite on Windows Seven and I have a problem with the executable files, a problem that I have ever found with other versions of LV (8.x, for example) and I'm a little surprised...
In the attachment you will find an example of what I mean.
There are two base screws, the main one (prova) and a Subvi (provasubvi). The main vi launches the Subvi and the Subvi simply create a chart. As you can see on the screws works fine, without any kind of problem.
I also created the exe file, without specifying that no particular option... and 'magic' of the application does not work as I want. In particular, it seems that the Subvi is running, but the front panel will not be accessible.
I also try to play with the Subvi construction structure and options, but nothing change.
Did you ever solve something like that?... I would say that I thank you in advance for any suggestion...
Andrea
Hello andrea,.
Looking at your project I've heard that you do not include the Subvi during the build of the project. SO I slightly modified. Please find the attachments.
Thank you and best regards,
srikrishnaNF
-
Does anyone know how to open an old MS Word document file with the .ltr file extension?
original title: file extension
Does anyone know how to open an old MS Word document file with the .ltr file extension? I would appreciate your help. Thank you.
If it's a Word document, why not just use Word to open it?
-
My Cookie file was corrupted in data and my programs continually pop up with the 'corrupt file' error when a program opens, pointing to \Users\name\Appdata\Roaming\Microsoft\Windows\Cookies.
The problem is, Chkdsk will not fix this, and I can't access the file. This opens up a world of problems when I need to fix this error, so I can upgrade to Windows 7. Help, please!
I just ran the scan again. He said of the errors found, but could not be repaired.
This problem actually has nothing to do with internet explorer. It's the cookies folder that is corrupt in the Windows folder in roaming. The error file is in conjunction with the programs, that I try to run (AIM, Skype, so forth). Trying to enter the folder it says it's corrupt. I don't know what is the root of the problems or how to solve this problem, but these measures have not helped so far. Regarding the repair, I will try that next.
http://Tinypic.com/view.php?pic=14mw4ly&s=4
Here is a picture. This is the error of the lower right
It's what the tool SFC to see system files corrupted and try to repair the system files.
SFC could not fix it.Looks like you will need to do this:
http://www.Vistax64.com/tutorials/88236-repair-install-Vista.html
Read the info on the link above.
Good luck with it.
Let us know how you go with it.
See you soon.
Mick Murphy - Microsoft partner
-
I lost my CD windows 7 Home Basic, can you provide me with the ISO file
I'm on PC assembled with i3 1st gen 3.07 GHZ processor Intel with 4 GB of RAM.
I put in Windows 7 Home Basic and have the activation key for the same thing but lost my CD. Can you provide me with the ISO files approved for her.
I had tried a lot of ISO file, but none worked mainly for basic Stater of Windows and home proplary. Is the ISO file or my PC is not supported with Home basic.
If Yes, then what is the solution.
Some of the links that I tried are
https://***.to/Windows-7-all-in-one-pre-activated-excellent-t7661549.html
Please help as soon as possible.
For 5 years, Microsoft made it fairly easy for users of the Windows 7 operating system to get reinstall media. If you have lost your support disc or installation retail collection; either it has been damaged or defective; You can download a copy of the edition that you have licensed from a membership site called Digital River. More recently, Microsoft ended the availability to reinstall media that you can download as a. File ISO in Digital River, which is a digital reproduction of an optical disc.
It was particularly convenient for people who could not easily get the manufacturer's recovery media, did not want to pay the fees required to get or preferred a clean configuration without the software packaged manufacturers or even a recovery partition does not work. It's easy to use, all you had to do was reinstall and reactivate using the product key located on the certificate of authenticity and download all the drivers on the manufacturers website.
Given that this option is no longer available, what are your options? See the article for more details:
-
I had CS5 on a computer that has crashed with WIndows 7. How to restore my CS5 with the backup files?
Available downloadable Setup files:
- Suites and programs: CC 2015 | CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4, CS4 Web Standard | CS3
- Acrobat: DC, XI, X | Suite X | 9,8 | 9 standard | 8 standard
- Captivate: 9 | 8 | 7 | 6 | 5.5, 5 | 1
- Cold Fusion: 11: 10 | 9.0.2 version 9.0.0, 9.0.1, 8.0.1, 8.0.0, 7.0, 6.1, 6.0, 5.0, 4.0
- Contribute: CS5 | CS4, CS3 | 3,2
- FrameMaker: 12, 11, 10, 9, 8, 7.2
- Lightroom: 6.4| 6| 5.7.1| 5 | 4 | 3
- Photoshop Elements: 14,13,12,11,10 | 9,8,7 win | 8 mac | 7 mac
- Premiere Elements: 14,13,12,11,10| 9, 8, 7 win | 8 mac | 7 mac
Download and installation help links Adobe
Help download and installation to Prodesigntools links can be found on the most linked pages. They are essential; especially steps 1, 2 and 3. If you click on a link that does not have these listed steps, open a second window by using the link to Lightroom 3 to see these "important Instructions".
-
Re-import L/r &; battery with the original file?
Re-L/r & battery with the original file import
Hi, need some help please.
After have exported them to an external editor for re - I want to import the image in lightroom, when I click on this option, prior to export (in re - import), it merely to send the image to the original folder not in the preview pane the long side of the Photo original/s and L/R so if I want to work on this, once again , I open the L/R folder and drag it into an external editor.
I've been under DISPLAY/SORT but don't no if any option to choose here.
Hope you understand the question
Thank you
RussSorted
If image does not appear in Lightroom, check that the Source film indicator and the menu does not appear "previous import." If you have switched to "Previous import", access the menu, and then select all photographs.
-
My links do not work when I combine another file with the pdf file
My favorite internal links do not work when I combine another file with the pdf file.
External links continue to work properly, though.
It makes no sense to me at all... but I hope that one of you kind folk can help?
With the tool link in Adobe Acrobat, you can edit the links or create new links.
-
What is the html file that is generated with published file?
Love the program, just a beginner who is unclear about the important facts on how to bring the Flash files to the internet.
My Question:
Is the HTML file which is generated when the Flash project seems sufficient for just the name index.htm and then post the file .swf, the javascript file and the file index.htm to my internet site and then give address for others to see?
- or - what I have to do a classic HTML file with a head and a body to contain the code that is written in the published HTML document generated by the Flash?
TIA,
Ken
You need integrate the swf file with it is designated object & embed tag, best way is to look at the HTML code generated by Flash and copy & paste the necessary tags in your current design.
-
Distribute an image with the AIR file
Hello-
Is there anyway that I can broadcast an image with the .air file (without incorporating the image in the .swf)?
Thank you for your help.Hello-
Is there anyway that I can broadcast an image with the .air file (without incorporating the image in the .swf)?
Thank you for your help.
Maybe you are looking for
-
Satellite A200 - BSOD after downgrading from Win Vista to XP Pro
HII I bought a Satellite A200.The windows vista family edition was the operating system that was installed.Compatibility issue with a particular software that I use, I changed the vista by a XP Professional SP3.But since then, the computer crashes an
-
Satellite Pro L10-> I want to increase the memory
I have a Satellite Pro L10 and want to increase memory. The manual accompanying it refers to "Chapter 7, unfortunately there is no chapter 7, annex just." Could you please tell me if I need specific to a type of memory card and also let me know what
-
Satellite A200 - network connection problem
My Satellite A200 struggled to connect to my wireless network. It detects the network, but then when I opened the networking and sharing service - it comes up with an error message - "the dependency service or group could start.I understand that it i
-
I have a hpe-450 t (presario). the table Bay (above the optical drive) has a double USB port, a multicard reader, and the on-off switch. my user's guide does not include the instructions to replace the multicard reader. on the PC that do * not * have
-
Problems with Windows install for Win 7
Is there any help out there for Windows Installer for Windows 7? Mine has stopped working and I can't make it work (I watched some of the fixes recommended by various websites, but they do not seem to work for me). This problem prevents me from inst