SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    257
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Passing Post Headers

    Hello I have been looking for an alternate to say cURL where you can pass variables via POST to a another PHP script.

    Can this be accomplished anyway other than cURL, I have not heard of any other solutions.

    Any advice is greatly appreciated thank you!

  2. #2
    SitePoint Wizard TheRedDevil's Avatar
    Join Date
    Sep 2004
    Location
    Norway
    Posts
    1,196
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You can check out sockets, http://no2.php.net/sockets

    Though its not as advance as curl.

  3. #3
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    257
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Looks interesting, im not sure I need something as advanced as cURL just a way to send variables via POST to a php script.

    Anyone know of anything else?

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You have to open a connection to the other web server and make an HTTP request. Your options are cURL and sockets. That's it...

  5. #5
    SitePoint Addict
    Join Date
    Oct 2004
    Location
    Brooklyn, NY
    Posts
    359
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's an example:

    http://shiflett.org/code/http-post.php

    One reason why we can't answer your question with any precision is that it is unclear whether you need the user to send the POST request. The techniques mentioned so far use PHP to send the request, and we're assuming that's what you want, because this is a PHP forum. If it's not, please specify. :-)

    Hope that helps.
    Chris Shiflett
    http://shiflett.org/

  6. #6
    SitePoint Addict
    Join Date
    Jun 2005
    Posts
    257
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I appologize for being unclear, that thought did not occur to me.

    Yes, I want to send the POST request via PHP, thank you for code I cant wait to test it out!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •