i have make this, it s work:
#!/usr/bin/php
<?php
$HOST="127.0.0.1" ;
$PORT="9091" ;
$USER="me" ;
$PASSWORD="mypassword" ;
$json = array("arguments" => "{}",
"method" => "session-stats") ;
$a = json_encode($json) ;
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch ...
Search found 2 matches
- Mon Jan 18, 2010 11:01 pm
- Forum: Web Interface
- Topic: Problem in PHP curl and the Transmission RPC
- Replies: 7
- Views: 13770
- Sat Sep 12, 2009 9:32 am
- Forum: Web Interface
- Topic: Python script for adding torrents
- Replies: 8
- Views: 20169
Re: Python script for adding torrents
Your script is interesting but is not woring for me.
at line 23 i have put :
conn.request('POST', '/transmission/rpc', body, headers)
r1 = conn.getresponse()
print r1.status, r1.reason
data1 = r1.read()
print data1
conn.close()
the answer is :
409 Conflict
<h1>409: Conflict</h1><p ...
at line 23 i have put :
conn.request('POST', '/transmission/rpc', body, headers)
r1 = conn.getresponse()
print r1.status, r1.reason
data1 = r1.read()
print data1
conn.close()
the answer is :
409 Conflict
<h1>409: Conflict</h1><p ...