Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8295789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:44:01+00:00 2026-06-08T14:44:01+00:00

I am looking for a secure solution for this particular scenario : I have

  • 0

I am looking for a secure solution for this particular scenario :

  1. I have an index.php file (let’s say http://www.my-app.com/index.php)
  2. I have to HTTP Post the authentication details to http://www.domain.com/login
  3. When login is verified, I have to load the response in an iframe within the index.php

while researching I found the following solutions,

Solution #1: Use javascript(jquery) / simple html form to submit
username & password to http://www.domain.com and mention the target as id of
that particular iframe. Thus the application loads in that iframe.

My take : This may not be secure as username and password may be sniffed, session may be hijacked. I have no idea how, but it seems to be possible. ( Even hidden variables can be seen in source )

Solution #2:

Use php curl to submit the username & password and load the url in the
iframe.

(Not very clear how to implement this. )

Limitations : Not an expert in php (obvious I suppose ). A code snippet would help.

Is there another way to implement the same technique in a secure way?

I have seen facebook do the same with their Page Tab Applications. I am sure most of the payment frameworks do the same. But how are they doing it ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:44:02+00:00Added an answer on June 8, 2026 at 2:44 pm

    I dont have much knowledge on CURL.It may help you for your second solution (PHP – CURL )

    <?php
     $ch = curl_init('http://mysite.com/index.php');
     curl_setopt ($ch, CURLOPT_POST, 1);
     curl_setopt ($ch, CURLOPT_POSTFIELDS,"username=xyz&pwd=123");
     $result = curl_exec ($ch);
     curl_close ($ch);
    ?>
    

    As per php manual :

      curl_exec() returns TRUE on success or FALSE on failure. 
      However, if the CURLOPT_RETURNTRANSFER option is set, it will return the result on success, FALSE on failure.
    

    So you have the result from the other site which you can display in iframe

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking at starting a new web app which needs to be secure (if
Looking to do a bit of refactoring... Using NHibernate I have this query currently
I have been looking for an affordable solution for a client of mine. In
Looking for a php login script. I've searched stackoverflow and have seen a lot
I have been looking everywhere but cannot find a clear solution for the following
Looking at options for embedding the 3D Secure page inside my own order form,
I'm looking for a protocol to secure a connection between a mobile device and
I am looking to find a way to programatically (C++) control/secure access to the
I am looking for a solution to license a WPF, Silverlight and WP7 assembly.
I just wanted a more elegant automated solution to my form validation. On PHP.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.