LemonInflux Posted September 15, 2008 Share Posted September 15, 2008 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 Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 15, 2008 Share Posted September 15, 2008 You probably want to use cUrl functions. Ken Quote Link to comment Share on other sites More sharing options...
LemonInflux Posted September 15, 2008 Author Share Posted September 15, 2008 Nope - needs to be an HTTP POST request. I don't think cURL can do that. Or can it? ---------------- Now playing: Hadouken! - That Boy That Girl via FoxyTunes Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 15, 2008 Share Posted September 15, 2008 Yes, you can do both posts & gets with curl. Ken Quote Link to comment Share on other sites More sharing options...
LemonInflux Posted September 15, 2008 Author Share Posted September 15, 2008 Is there no other way except cURL? cURL needs to be activated as an extension right? And I'm pretty certain a host I use doesn't support cURL. ---------------- Now playing: Hadouken! - That Boy That Girl via FoxyTunes Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 15, 2008 Share Posted September 15, 2008 Did you look at the documentation on Google? There are examples written in PHP there. Study them. Ken Quote Link to comment Share on other sites More sharing options...
448191 Posted September 15, 2008 Share Posted September 15, 2008 If cURL is not supported, you can use fsockopen(). Quote Link to comment Share on other sites More sharing options...
LemonInflux Posted September 15, 2008 Author Share Posted September 15, 2008 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 Quote Link to comment Share on other sites More sharing options...
448191 Posted September 15, 2008 Share Posted September 15, 2008 So? Just take the required classes. Quote Link to comment Share on other sites More sharing options...
LemonInflux Posted September 15, 2008 Author Share Posted September 15, 2008 But it's built onto the framework. I thought I had to include it all to use bits, because it was all linked. ---------------- Now playing: Hawthorne Heights - Life On Standby via FoxyTunes Quote Link to comment Share on other sites More sharing options...
448191 Posted September 15, 2008 Share Posted September 15, 2008 No. You might need some additional classes, but definitely not the whole framework. Quote Link to comment Share on other sites More sharing options...
LemonInflux Posted September 15, 2008 Author Share Posted September 15, 2008 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 ) but I guess, for now at least, this seems an infinitely simpler option. ---------------- Now playing: Hawthorne Heights - Life On Standby via FoxyTunes Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.