How to Post a password to a different server ?

by alphi
4 replies
Hello All,

I know the topic of the thread is quite weired but I did not get a better topic.

So my problem is that, I am building a free sms sending website. And API codes have been provided to me by the sms providing company.

Now the problem is that the form I built to send the Destination Mobile Number and Message also needs to send the username and password of the account to the server to which account the company has alloted sms credits.

The following is the sample code I used in the html file to POST the data to the server:-
Code:
<form action="hxxp://api.mVaayoo.com/mvaayooapi/MessageCompose" method="post">
 
Number:<inputtype="text" name="receipientno" />
Message:<inputtype="text" name="msgtxt" />
<inputtype="hidden" name="user" value="USERNAME:PASSWORD" />
<inputtype="hidden" name="senderID" value="mVaayoo" />
<inputtype="hidden" name="state" value="0" />
<inputtype="submit" />
</form>
Now the problem is when some one will click on view source option, they'll be able to see the username and password.
So is there any method through which I can silently send this crucial details secretly without bringing it to the notice of normal user.
Is there any other way to send this perticular data?

A quick help would really be appreciated...

Thank you all in advance
#password #post #server
  • Profile picture of the author theIMgeek
    What you need is cURL. It will let you accept the user's form input (without your password included) then you can reformat the request, add your access code, and re-submit the form to your provider.

    The second submit is done direct from PHP so no code is ever outputted to the browser.

    Here's a pretty good tutorial on the subject: How to submit a form using PHP

    -Ryan
    Signature
    FREE WSO: Protect and Automatically Deliver Your Digital Products

    Ask the Internet Marketing Geek
    <-- Happy to help with technical challenges
    MiniSiteMaker.org <-- Free software to make your mini-sites fast and easy
    {{ DiscussionBoard.errors[1696716].message }}
  • Profile picture of the author alphi
    @RJP
    Thank you very much for the help on this topic. But is there any method which can be used directly through PHP and no other language.
    And can you explain from an example the use of cURL
    {{ DiscussionBoard.errors[1696835].message }}
  • Profile picture of the author theIMgeek
    cURL is a function of PHP. However, there is a chance that your web server does not have the curl feature turned on.

    You can find examples of the PHP code at that link I provided above.

    -Ryan
    Signature
    FREE WSO: Protect and Automatically Deliver Your Digital Products

    Ask the Internet Marketing Geek
    <-- Happy to help with technical challenges
    MiniSiteMaker.org <-- Free software to make your mini-sites fast and easy
    {{ DiscussionBoard.errors[1696927].message }}
  • Profile picture of the author alphi
    @RJP
    Thank you very much friend. And I used the mvaayoo.com as my sms gateway. They are one of the best in India also yahoo, google and all others use them as well.
    {{ DiscussionBoard.errors[1696955].message }}

Trending Topics