Jump to content

[SOLVED] Sending an HTTP request


LemonInflux

Recommended Posts

Hello. I'm playing with Google's YouTube Data API (without using the Zend Framework), and I need to perform a POST HTTP request on a URL.

 

My question is - do I use http_post_data() or http_request(). And can someone give me a description of the parameters with a bit more detail than the php manual? For example, on http_post_data:

 

 

url

 

    URL  <-- Simple enough

data

 

    String containing the pre-encoded post data <-- What?

options

 

    request options <-- I'm guessing the headers to send?

info

 

    Request/response information <-- links to http_get()? but I need to do a post request

 

Any help is appreciated.

 

Thanks,

 

Tom.

 

 

----------------

Now playing: Pendulum - Fasten Your Seatbelt (Feat. Freestylers)

via FoxyTunes

Link to comment
Share on other sites

Did you look at the documentation on Google? There are examples written in PHP there. Study them.

 

Ken

 

It's all based around the Zend Framework GData module.

 

Hello. I'm playing with Google's YouTube Data API (without using the Zend Framework), and I need to perform a POST HTTP request on a URL.

 

----------------

Now playing: Hadouken! - Mister Misfortune

via FoxyTunes

Link to comment
Share on other sites

Ah ok. My initial intention was to try and build a youtube data API class without using the zend framework (so I had something I had built to feel proud of etc :P) but I guess, for now at least, this seems an infinitely simpler option.

 

----------------

Now playing: Hawthorne Heights - Life On Standby

via FoxyTunes

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.