This code is essentially all from Alex Schultz, reposted here for a handy local reference. I changed the api call to post, and added bits for tags and description.
When the original delicous-PHP code that I had been using stopped working, I hunted around for a new solution. There are a handful of big classes that didn’t do the trick for me, but this straightforward curl code works well. My single bookmarklet to post links to Txp and delicious is back in action.
TextDrive Joyent servers, it’s probably necessary to enable curl support for PHP.
$dusername = ““;
$dpassword = ““;
$api = ““;
$link = urlencode($link_url);
$desc = urlencode($title);
$ext = urlencode($body);
$deltags = urlencode(str_replace(““, ““, $keywords));
$apicall = ““;
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_USERAGENT, ‘‘);
$xml = curl_exec ($ch);
Update: Sometimes the https certification verification causes problems. Adding “curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);” appears to solve this problem.
I found myself today with the desire to incorporate a bit of watermark-ish text and graphic into a LaTeX document. The regular graphics commands don’t work very well with this, so I went googling and found the code below.
Note that the following isn’t my tip, but the page that references the code points to a 404 link. I tracked down the google cache to get the original link back out and thought I’d share.
There are two
makebox lines present. Uncomment the first to use a text or stamp the output of another command on the page; or use the second (replace the filename) to use a graphical watermark. Also, remove the asterisk from the opening
AddToShipoutPicture command to have your image stamped on every page, rather than just the first.