Diff Revisions 4 vs 5 for /trunk/blitter/class.blitter.php

Diff revisions: vs.
4 5   <- Revisions
       
      Diff lines for:
 Rev 4 : Lines 33 -> 39
 Rev 5 : Lines 33 -> 40
33 33 /**
34 34 * Various support variables
35 35 */
36 - private $tmp_fn = "lsfm_tw";
36 + private $tmp_fn = 'lsfm_tw';
37 + private $xml_file_name = 'class.xml.php';
37 38 private $buffer;
38 39 private $message;
39 40
       
      Diff lines for:
 Rev 4 : Lines 62 -> 72
 Rev 5 : Lines 63 -> 72
62 63 public function post()
63 64 {
64 65 $this -> service = 'post'.$this -> service;
65 - $this -> service();
66 + if(is_callable($this -> service, true, $callablename)) { call_user_func(array(get_class($this), $this -> service)); }
66 67 }
67 68
68 69 /**
69 - * Method sending message to Twitter
70 + * Method send message to Twitter
70 71 *
71 72 * @param string $message Prepared message to send
72 73 */
       
      Diff lines for:
 Rev 4 : Lines 93 -> 115
 Rev 5 : Lines 94 -> 115
93 94 }
94 95
95 96 /**
96 - * Method sending message to Blip
97 + * Method send message to Blip
97 98 *
98 99 * @param string $message Prepared message to send
99 100 */
100 101 public function postBlip()
101 102 {
102 103 $curl_handle = curl_init();
103 - curl_setopt($curl_handle, CURLOPT_URL, $this->bl_url);
104 + curl_setopt($curl_handle, CURLOPT_URL, $this -> bl_url);
104 105 curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT,2);
105 106 curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER,1);
106 107 curl_setopt($curl_handle, CURLOPT_POST,1);
107 108 curl_setopt($curl_handle, CURLOPT_POSTFIELDS, 'body='.$this -> message);
108 109 curl_setopt($curl_handle, CURLOPT_USERPWD, $this -> user.':'.$this -> pass);
109 - $buffer = curl_exec($curl_handle);
110 + $this -> buffer = curl_exec($curl_handle);
110 111 curl_close($curl_handle);
111 112
112 - if($this -> $buffer)
113 + if($this -> buffer)
113 114 {
114 115 return TRUE;
115 116 }
       
      Diff lines for:
 Rev 4 : Lines 130 -> 136
 Rev 5 : Lines 131 -> 136
130 131 {
131 132 $lfm_url = 'http://ws.audioscrobbler.com/1.0/user/'.$this -> lfm_user.'/recentlovedtracks.xml';
132 133
133 - include_once "xx_xml.php";
134 + include_once($this -> xml_file_name);
134 135 $raw = new xx_xml($lfm_url ,'url');
135 136
136 137 $last_url = $raw -> data ['recentlovedtracks|track|url']['data'][0] ;