Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

cURL "PUT" question  (PHP)

Posted on 2013-01-15
2
Medium Priority
?
470 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 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

Industry Leaders: 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

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…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

722 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