Solved

cURL "PUT" question  (PHP)

Posted on 2013-01-15
2
463 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 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This article discusses how to implement server side field validation and display customized error messages to the client.
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 dynamically set the form action using jQuery.

630 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