Sending header and GET

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lilbit02
    New Member
    • Nov 2007
    • 22

    Sending header and GET

    This is what I need to accomplish. I'm using Google's Provisional API and I'm trying to retrieve a list of users I already have created.

    I need to send to Google

    Content-type: application/atom+xml
    Authorization: GoogleLogin auth=your-authentication-token

    As headers in PHP. I also need to send a Get request to the page: https://www.google.com/a/feeds/{domain}/user/2.0 and I'm totally lost as to how to do this without using a form.



    My attempt at the headers is below. Is that considered correct?

    [PHP]

    <?php

    header("Content-Type: Application/atom+xml");
    header("Authori zation: GoogleLogin auth=[auth token]");

    ?>


    [/PHP]

    As for the GET request what would that code look like?
  • MarkoKlacar
    Recognized Expert Contributor
    • Aug 2007
    • 296

    #2
    Hi,

    To simulate the GET you just add some stuff to the url, like this:

    Code:
    http://www.something.com?name=john&age=21&town=detroit
    Or whatever...

    Let me know if it works.

    GL

    Comment

    Working...