Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Can I post data with cURL to an iframe using PHP?
Note : Consider that php curl script and the page with iframe that contains the form, are both in my server. The iframe includes a form from a remote server.
You are confusing server side and client side here. Obviously you can use iframes and PHP/CURL. Just put your form code in the a page that renders to the iframe and when the user submits the form, process the form, send the curl request and the process the return as you normally would.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I configured authentication using Angular and PHP.
But if page is reloaded - user have to enter login and password again.
Because after reloading - angular's variable "IsLoggedIn" is set to false.
Is there a way how to pass session data from php side to angular without additional ajax request to server?
Because firstly php framework is loaded and then it shows a view with html and angular scripts.
you can do it by jwt or any other token base authentication.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I have a PHP script which invokes another PHP script thru header("Location:"). Is it possible to pass some data to that second script, e.g. login name. That second script uses POST as its form's method. Currently I pass data thru file on server
As this basically just redirects the browser to the url specified in your Location header you can not simulate a POST request here.
What you can do is to send GET-parameters with the requets.
For example you could do this:
<?php
header("Location: nextpage.php?login_name=".$login_name);
Then you would access this in the nextpage.php code with $_GET['login_name'].
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
How can I navigate on a website, using php ? (I want with a local program to access a website and parse html pages, fill forms, click buttons and being redirected, etc.; as if PHP was a real guy). Yet, I use Ruby Mechanise but it's not sufficient.
Thanks
To interact with a website you would most likely use a javascript framework such as phantomjs or dalekjs. PHP is not made for DOM manipulation and interaction or page automation.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
How knows how the browsers render the html and server side codes? does the browser render it line by line? or do the server side code first then the html? specially in php? And is there a way to force the browser to do the php code first, and then the html, or not?
Any help?
Server-side code is never sent to the browser. The server executes the PHP code and sends the resulting HTML to the browser, which then parses it. It already does what you want.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I was following the curl examples here to log into a wordpress site via curl:
- http://www.sitepoint.com/using-curl-for-remote-requests/
Here is what I need to do:
Log in wordpress
Redirect to form page
Post to form page
From the examples in the url I posted above, the curl does a post to login but I am unsure how to make it post again after it redirects to the form after logging in.
All from a script hosted somewhere else.