File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ require __DIR__ . '/../vendor/autoload.php ' ;
3
+
4
+ use \Curl \Curl ;
5
+
6
+ $ data = '<?xml version="1.0" encoding="UTF-8"?>
7
+ <rss>
8
+ <items>
9
+ <item>
10
+ <id>1</id>
11
+ <ref>33ee7e1eb504b6619c1b445ca1442c21</ref>
12
+ <title><![CDATA[The Title]]></title>
13
+ <description><![CDATA[The description.]]></description>
14
+ <link><![CDATA[https://www.example.com/page.html?foo=bar&baz=wibble#hash]]></link>
15
+ </item>
16
+ <item>
17
+ <id>2</id>
18
+ <ref>b5c0b187fe309af0f4d35982fd961d7e</ref>
19
+ <title><![CDATA[Another Title]]></title>
20
+ <description><![CDATA[Some description.]]></description>
21
+ <link><![CDATA[https://www.example.org/image.png?w=1265.73&h=782.26]]></link>
22
+ </item>
23
+ </items>
24
+ </rss> ' ;
25
+
26
+ $ curl = new Curl ();
27
+ $ curl ->setHeader ('Content-Type ' , 'text/xml ' );
28
+ $ curl ->post ('https://httpbin.org/post ' , $ data );
29
+ var_dump ($ curl ->response );
You can’t perform that action at this time.
0 commit comments