Send HTTP requests using cURL Rumi, June 6, 2014 Reading a URL via GET: curl http://example.com/ Defining any HTTP method (like POST or PUT): curl http://example.com/users/1 -XPUT Sending data with a request: curl http://example.com/users -d"first_name=Bruce&last_name=Wayne" If you use -d and do not set an HTTP request method it automatically defaults to POST. Performing basic authentication: curl http://user:password@example.com/users/1 All together now: curl http://user:password@example.com/users/1 -XPUT -d"screen_name=batman" Related Scripts BashCurl
Show all images in a folder with PHP September 11, 2010 <?php //Your folder $files = glob(“icons/*.*”); $colCnt=0; echo ‘<table border=”0″ style=”width:590px;”>’; for ($i=1; $i<count($files); $i++) { $colCnt++; if ($colCnt==1) echo ‘<tr>’; echo ‘<td width=”25%” style=”font-size:8.5px; font-family:arial”>’; $num = $files[$i]; echo ‘<img src=”‘.$num.'” align=”absmiddle” /> ‘; print substr(substr($num,6,100),0,-4); echo ‘</td>’; if ($colCnt==4) { echo ‘</tr>’; $colCnt=0; } } echo ‘</table>’; ?>… Read More
WordPress Backup Script August 23, 2020 #!/bin/bash # This script creates a compressed backup archive of the given directory and the given MySQL table. More details on implementation here: https://theme.fm # Feel free to use this script wherever you want, however you want. We produce open source, GPLv2 licensed stuff. # Author: Konstantin Kovshenin exclusively for… Read More
Ozeki PHP Plugin June 6, 2014 <?php $gatewayURL = 'http://192.168.1.100:9333/ozeki?'; $request = 'login=sendmail'; $request .= '&password=mypassword'; $request .= '&action=sendMessage'; $request .= '&messageType=SMS:TEXT'; $request .= '&recepient='.urlencode('01711673093'); $request .= '&messageData='.urlencode("PHP Hello World"); $url = $gatewayURL . $request; //Open the URL to send the message file($url); ?> Related Read More