Jump to content

[SOLVED] PHP to 3rd party API?


ars_moriendi

Recommended Posts

Hi and thanks for reading this.

I'm working to create a PHP page which will sell tickets to an event that a client is holding. The ticket-seller is Brown Paper Tickets and they have an API (documentation: http://www.brownpapertickets.com/apidocs/eventlist.html. The last time I worked with an API was two years ago and in Java (not javascript, Java) and I'm working in PHP right now, where my knowledge is pretty shallow.

Now, with all of this in mind, I have a few questions that I hope some of you will be kind enough to answer.

1.) I need to send calls over https using PHP without a form event and I've forgotten how. Can anyone refresh me?

2.) Once I've made those calls, I need to parse the rss data they return. Any tips?

3.) I'm certain I'll have more questions as I move through this project. Does anyone remember a similar topic discussed elsewhere that I can refer to, so I'm not continuously bothering others?

 

I appreciate all your help. Thanks for your time.

-A

Link to comment
Share on other sites

Sorry, but the information at http://us2.php.net/manual/en/ref.sockets.php is starting to turn to gobbledy-gook and I can't follow the thread.

 

I tried the example of the tutorial at http://www.phpfreaks.com/tutorials/50/1.php, using the following:

$socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP); 
/*$connection = socket_connect($socket, "https://www.brownpapertickets.com/api/submitorder.html",443);*/
$connection = socket_connect($socket, "www.brownpapertickets.com",443);
while($data=socket_read($socket,2046,PHP_NORMAL_READ)){
echo $data."<br />";
}

Obviously, this doesn't work, but I can't seem to find a simple explanation why.

 

If it helps to clarify (and again, please forgive my limited experience), here's the order of operations.

 

I understand I can open a socket to www.brownpapertickets.com, in theory, but I've been unsuccessful in doing so and am still not sure if the same rules apply when trying to send information directly to an HTML document. I'll keep looking for info on reading and parsing rss (thanks for ipn tip, by the way).

 

Again, thanks for any help offered.

-A

 

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.