okay i solved this by uploading the lib file inside a folder and addressing it as ‘//’
damn, i am so happy!!!!!!!!!!!!!!!!!! ๐ ๐ ๐ ๐ ๐
i uploaded this code file named post.php and the file it needs tmhOAuth to the host(eu5.org) under root directory and set permissions to 755 on both:
i run the script from my site .eu5.org/post.php but get the below error
<?php
$tweet_text = 'Hello Twitter';
print "Posting...\n";
$result = post_tweet($tweet_text);
print "Response code: " . $result . "\n";
function post_tweet($tweet_text) {
require_once('ftp://<username>.eu5.org@eu5.org/tmhOAuth.php');
$connection = new tmhOAuth(array(
'consumer_key' => '******',
'consumer_secret' => '******',
'user_token' => '******',
'user_secret' => '******',
));
$connection->request('POST',
$connection->url('1/statuses/update'),
array('status' => $tweet_text));
return $connection->response['code'];
}
?>
Warning: require_once() [function.require-once]: ftp:// wrapper is
disabled in the server configuration by allow_url_include=0 in
.php on line 8Warning: require_once(.php) [function.require-once]: failed
to open stream: no suitable wrapper could be found in .php on
line 8Fatal error: require_once() [function.require]: Failed opening
required ‘.php’
(include_path=’.:/usr/lib/php:/usr/local/lib/php’) in on
line 8
note: allow_url_open is off.
how do i import the class? using curl etc.?
thanks
When you want to include (or require, it’s only a matter of error reporting) a file, it is strictly useless (and nonesense) to use urls.
your library must be on YOUR server, let’s say in the directory `library/’.
Your code would be that one :