POST data to URL using PHP [closed] - php

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I want to post an array or set of variable in a URL and post that data to that URL.
i have a URL to post data
i have code igniter
i have to send data to that URL using code igniter function
So how should i send that data to that URL?
people say use curl PHP, i am a web developer using Linux but new to it, so kindly be easy.
Best Regards

cURL is an easy way to send/retrieve data from other URLs. Personally, I find it to be fairly easy to use too -- you can see a tutorial here. If you don't have cURL, there are other options.
If you need to forward the user to another URL using POST, then you're in a bit more of a bind. HTTP was not designed that way. You can create a page on your side which has a form filled out with all of the post variables and have a script tag with document.forms[0].submit().

Related

Request other URL in one PHP Script [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Hi i wana make a request in my script to a other page and the request have some get Parameters they come back.
(I dont wana do this with ajax only php in one script)
this should be done without redirecting to other page. I wana make this in the background to validate the data they come back from the other page in one script
www.example.de -> request www.exampel2.de/?ex=1
then i will validate the example2 get parameter in example.de
Any solutions?
PHP's cURL functions will allow you to perform advanced HTTP requests. You can use file_get_contents to access REST APIs:

Auto suggestion in search with json return [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
Auto suggestion in search with json return
I want to returning json data from database when user search in box.
And display suggestion box of searched text.
You added jquery at your tags, So, I suggest you take a look at this plugin:
http://jqueryui.com/autocomplete/
You just need to create the "availableTags" variable after process your JSON result.
To see the example, click on "view source" at link.
You can use http://jqueryui.com/autocomplete/ plugin.
It has support for having remote data source which will help you in accomplishing everything you mentioned above.
You can go through the examples given in the link for implementation details. This section http://jqueryui.com/autocomplete/#remote will be more useful for your requirement.

Passing data from html server (with no php) to server with PHP and return data to that non-php server [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
Here's the deal:
I have blog, where I can only use a javascript and free php server. I need to send form data to that php server (this I know how to do), and return some info back to the blog page. Is that even possible?
The only way I can think with out cross domain request is as below
1) make this form in your blog
<form action="FULL_URL_TO_YOUR_PHP_FILE">
/// your fields
</form>
2) in your php file save data received from form and serialize the data(that you want to send back to your blog) in url format like
if you want to pass name and surname YOUR_BLOG_URL?name=myName&surname=MySurname and make redirect from your php file to your blog
header('location:YOUR_BLOG_URL?name=myName&surname=MySurname');exit;
3) now on your blog make an onload event like if you have jquery than
$(document).ready(function(){
alert(window.location.href);
// do some spliting or regexp or anything else to get your data from url
})

How can I store data from MySQL into html using php? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions must demonstrate a minimal understanding of the problem being solved. Tell us what you've tried to do, why it didn't work, and how it should work. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
This is something I need help on.
Im going to allow a user from my database to "share" a record which gets sent from the database into a solid html file.
So I'm looking at ways to create a html file from data in a database which is passed through php and stored in a location on the server. with no interaction from the user at all other than pressing 'share'. They would be sent the url to look at it upon success.
I'm looking for any functions or tuts on how to best make a html file from php. any help is appreciated. I think I may be looking into this too much, and the answer may be staring me in the face
As it got clear, you want static html files, created dynamically via PHP and written on the server.
The steps you need to follow are clear too:
You need the database and as you said you have it
You need to connect to it via PHP
Then do the respective queries
Fetch the data from them
Use it in the HTML
Open a file
Send the used data to it
Write the file with the relevant name
The querying should start after the button share is clicked (you can track this via isset() function)

create a form similar to a website [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
Help please create a form similar to a website.
How can i achieve a form like in this website www.myclean.com, i already got the first step in the form which is the slider and checkbox.
Now I need to know how to process that information and put it in the another page please try the form in this site www.myclean.com.
I can only think of php to do this get or post, do you have other ideas?
Thanks! :)
here is what I did in my slider and checkbox.
jsfiddle.net/z2zaz/9/
You can process the form in nearly any language you'd like, or you can email the results to yourself, but I'd recommend against that due to all the spam bots.
The language doesn't really matter. PHP is a fine solution, if that's what you're asking.

Categories