Posts Tagged With: curl

Watch for Ubuntu 9.10 Launch

Tagged with: , , , , , , ,

This script will run check for ubuntu launch once every 5 mins and let you know if there is an launch.


while [ 1 ]; do if [ -z "`curl -I "http://cdimage.ubuntu.com/releases/9.10/release/"|grep "404"`" ]; then kdialog --msgbox "9.10 Released"; exit; fi; sleep 300;  done
2 Comments »

Get a Random Futurama Quote

Tagged with: , , , ,

Useless – but fun – get a random Futurama Quote


curl -Is slashdot.org | egrep '^X-(F|B)' | cut -d \- -f 2
No Comments »

Post to Delicious From Command Line

Tagged with: , , , , ,

Post to Delicious


curl "https://<username>:<password>@api.del.icio.us/v1/posts/add?&url=[URL]&description=[TITLE]&tags=[TAGS]&replace=no" 
No Comments »

Post a new Task to Nexty

Tagged with: , , , , , , ,

This is the command used to post a new task to the nexty GTD tool.


curl --basic --user "binnyva:password" --cookie-jar /tmp/nexty-cookies.txt --data-ascii "task=`echo $@|tr ' ' '+'`&layout=cli" "http://nexty.org/tasks/add.php"
No Comments »

Post To Identi.ca using Curl

Tagged with: , , , , , , ,

Post a status update to identi.ca using just curl


curl --basic --user binnyva:PASSWORD --data-ascii "status=The new status goes here" http://identi.ca/api/statuses/update.xml
No Comments »

FTP Using Curl

Tagged with: , , , , , ,

Copy a file to a remote system using FTP with the Curl command…


curl -T filename.txt -u username:password ftp://example.cot/filename.txt

Original Article

No Comments »

Sensex Figure using a Linux Command

Tagged with: , , , , , , ,

This one command will fetch and display the latest sensex figure in Linux. This command basically downloads a page, locates a specific line, and then extract just the necessary portion from it. I am sure you could find other uses for this method.


curl -s "http://money.rediff.com/money/jsp/markets_home.jsp" |grep ''|head -n1|perl -pe 's/^.+\">([\d\,\.]+)<\/TD>.+$/\1/i;'
No Comments »

Get URL Headers using CURL

Tagged with: , , , , ,

Show the headers of an URL using Curl


curl http://example.com -I
1 Comment »

Word Meaning from Linux Command Line

Tagged with: , , , , , ,

Find the meaning of a word from dict using curl. System must be online for this to work.


curl dict://dict.org/d:word
No Comments »

Using PHP’s Curl functions behind a Proxy

Tagged with: , , , ,

Using PHP’s Curl functions even if the net is accessible only thru a proxy. This is the only way curl can be used if you use GoDaddy’s hosting.

<?php
$ch = curl_init("http://rss.news.yahoo.com/rss/topstories");

curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_PROXY, "http://192.168.0.15:80");
curl_setopt($ch, CURLOPT_PROXYPORT, 80);
//curl_setopt ($ch, CURLOPT_PROXYUSERPWD, "username:password");

$data = curl_exec ($ch);
curl_close($ch);
print $data;
?>
No Comments »