By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,751 Members | 1,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,751 IT Pros & Developers. It's quick & easy.

Sending header and GET

P: 22
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("Authorization: GoogleLogin auth=[auth token]");

?>


[/PHP]

As for the GET request what would that code look like?
Feb 12 '08 #1
Share this Question
Share on Google+
1 Reply


MarkoKlacar
Expert 100+
P: 296
Hi,

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

Expand|Select|Wrap|Line Numbers
  1. http://www.something.com?name=john&age=21&town=detroit
Or whatever...

Let me know if it works.

GL
Feb 14 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.