Solved

cURL "PUT" question  (PHP)

Posted on 2013-01-15
2
443 Views
Last Modified: 2016-03-18
I have an API command i want to implement to ADD an email addr to an addr list in constant contact.
I'm familiar in general with using cURL for simple  URLs that have ?GET parameters built in to the URL (and that's it for the data that i send to the API in other cases)
ConstantContact has the command/data in XML (which is fine), but it is suggested to put it in a file and then do a PUT using cURL.

My question is:   do i have to go to the trouble of making it a file and using PUT,  wouldn't there be a similar/equivalent method/strategy to just make a 10-line text string and send that as the parameter data for the cURL operation?

If there is a similar way, in general does an API care which method was used (PUT vs. others).

thanks
0
Comment
Question by:willsherwood
2 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 38780957
Yes, they care because the processing, just like in PHP, depends on the method used.  In PHP, GETs are in the $_GET array and POSTs are in the $_POST array.  All web servers and programming languages use these distinctions as far as I know.
0
 

Author Comment

by:willsherwood
ID: 38780970
aha,  sounds like i need to go ahead and write a file, etc.
thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
jQuery force form POST 7 85
How to get this library to work load? 8 37
How Close unsubmited attempts 10 42
MySQL Persistent Connections 10 30
Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question