Send POST request from vb.net - html

I'm developing an application for Cisco IP phone to send messages. Currently I have the HTML code to send the request. But I need to send request from VB.NET therefore I can integrate with one of my application. please find the below mentioned HTML Code,
<html>
<head></head>
<body>
<form method="POST" name="XML" action="http://Reed:password#192.168.13.112/CGI/Execute">
<textarea name="XML">
<CiscoIPPhoneText><Text>Hi Mr.Anton..! Welcome ..!</Text> </CiscoIPPhoneText>
</textarea><br>
<input type="submit" value="POST"/>
</form>
</body>
</html>
Currently this code is working with HTML. I need to send these information to the IP Phone using VB.NET
Your help is highly appreciated.

Related

POST to external form that has reCAPTCHA

I'm using a cloud CRM service that has a web form functionality, but the design of the form is limited.
I'm trying to create a custom http form that POST to the original form.
<form method="POST" action="//externalForm.Url/path">
<input type="text" name="name">
<textarea name="message"></textarea></div>
<input class="btn btn-primary" type="submit" value="Submit"></div>
</form>
The problem is, the form uses reCAPTCHA, so I couldn't do this.
Would it help if I had reCAPTCHA in my form?
what should I do?
If your cloud CRM service has a CRUD API you can post by way of Webservice via the server or even on the front-end, but because of security reasons you wont be able to recreate the exact form action on your server and simply post to theirs.

Validate username as input is provided to textbox in jsp

I have a jsp form in which a user can signup by entering username and password. I have to check dynamically whether the username exists in mysql database as the username is typed into the text box. Here is a sample code:
<html>
<head>Sample Signup</head>
<body>
<form action="updatedb.jsp" method="post">
Username : <input type="text" name="uname">
<br>
Password : <input type="text" name="upass">
<br>
<input type="submit" value="signup">
</form>
</body>
</html>
I am new to jsp so an elaborated answer will be more helpful. If i missed any other important info, ask me right away.
Java cannot respond to the client-side methods like onChange (not directly). Those methods call Javascript. Javascript is not actually related in any way to Java; its only called that because it uses the bracket-style syntax for functions as opposed to VB-style syntax. The only way to involve Java itself in the client-side methods would be to use Javascript to send an Ajax request to a JSP/Servlet and receive a response back. The simplest way to send an Ajax request in Javascript is with jquery (a javascript library).

How do I make a simple email form submission in HTML?

I tried w3schools but it didn't help and I tried other websites too. I just wanna make a short html script that sends an email to an email address, but I keep reloading my email inbox and nothing comes up. Can you help?
<form action="MAILTO:MY_EMAIL#yahoo.com" method="post" enctype="text/plain">
<input type="text" name="email" value="Email">
<input type="text" name="message" value="Message">
<input value="Submit" type="submit">
</form>
You need to use a server side script here. HTML alone won't help you here. HTML is just the frontend logic. You need some script on backend that accepts this data you submit and actually sends out an email. To take the example in PHP, assuming u have the server set up and all or that your shared
<form action="sendmail.php" method="post" enctype="text/plain">
<input type="text" name="email" value="Email">
<input type="text" name="message" value="Message">
<input value="Submit" type="submit">
</form>
sendmail.php
$email=$_POST['email'];
$message=json_encode($_POST);
$receiver="MY_EMAIL#yahoo.com";
$mailer="mailer#myservice.com";
mail($email,"Message for enquiry or whatever",$message, array("from"=>$mailer));
There were, at some point, browsers that supported forms of this type. However, they're all gone now -- you will need a server-side script to send email. It's impossible to do using HTML alone.
You are confusing a few things.
When you Submit a form, it goes from the client (browser) to your server, which acts upon it. The form action needs to be a URL which handles the request. The mailto: URI scheme is not a valid action to use.
You have two choices:
You can create a mailto: link like this:
Send email
which will open your default email client,
OR
You can put a URL corresponding to an end point on your server, something like
form action="/send/mail"...
and have your server send the email
I believe the easiest way to do this is using a service like Zapier or IFTTT. Both of them offer a way to create Zaps/Applets that can send an email when you post to a specific url.
This is what configuration would look like in IFTTT and Zapier .
IFTTT is simpler to setup, Zapier has more options, like sending to more than one emails. I believe IFTTT only lets you send to your account's email.

Sending files through email - multipart

I want to make a HTML document that allows the user to send files through email. I've read I have to use the "multipart/form-data".
<HTML>
<HEAD>
<TITLE>File test</TITLE>
</HEAD>
<BODY>
<FORM ACTION="mailto:user#mail.com" METHOD="POST" ENCTYPE="multipart/form-data">
Send a file
<BR><INPUT NAME="File" TYPE="file">
<BR><INPUT TYPE="submit" VALUE="Send">
</FORM>
</BODY>
</HTML>
This is a simple example that I cannot fix. What am I missing?
Edit:
The problem is that I receive the email without any content.
The mailto: URI scheme, when used for form actions, requires a combination of a compatible browser and email client. These are not so common as to be practical for use on the WWW (see also The Mythical Mailto:).
I'm not aware of any combination that supports file attachments via that scheme.
You need to use an HTTP (or HTTPS) URI with a server side form handler.
Mail will be sent successfully with your default mail client that is set-up in your machine. Make sure you have default mail client set-up. Eg: Outlook Express, Office Outlook.

Is there anyway to use the Imageshack API without PHP?

If I use the ImageShack API just in a form like this:
<form method="post" enctype="multipart/form-data" action="http://www.imageshack.us/upload_api.php">
<p><input type="file" name="fileupload"></p>
<p><input type="text" name="key" value="Your_Developer_Key"></p>
<p><input type="submit" value="Go"></p>
</form>
the browser gets taken to an XML doc, which has the image URL, but is no use because I'm no longer on my site. I've tried loading it in an iFrame and that works, but I can't access it because it's cross-domain.
A Http Post in jquery won't work because I can't send a file in it. I don't know any PHP so using that would take lots of time to learn & setup etc. Do I have any other options?
You mention you know Ruby on Rails.
Posting a file with Ruby is rather simple. See: Ruby: How to post a file via HTTP as multipart/form-data?