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
https://forums.phpfreaks.com/topic/124347-solved-sending-an-http-request/
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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.