/ Published in: Bash
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/bash # ping technorati #set -v # configuration ADDRESS="http://www.acooke.org/cute" NAME="C[omp]UTE" # (end of configuration) export PATH="$PATH:$CUTE_DIR/scripts" tmp=`mktemp` echo "<?xml version=\"1.0\"?> <methodCall> <methodName>weblogUpdates.ping</methodName> <params> <param> <value>$NAME</value> </param> <param> <value>$ADDRESS</value> </param> </params> </methodCall>" > "$tmp" size=`cat "$tmp" | wc -c` msg=`mktemp` echo "POST /rpc/ping HTTP/1.0 User-Agent: bash script across netcat - andrew@... Host: rpc.technorati.com Content-Type: text/xml Content-length: $size " > "$msg" cat "$tmp" >> "$msg" rm "$tmp" cat "$msg" cat "$msg" | nc rpc.technorati.com 80 rm "$msg"
URL: bash_xmlrpc