Php Guru That Is Familiar With Twitter Wanted
http://img841.imageshack.us/img841/9560/errorreport.png
I'm on a namecheap shared hosting account which should have curl so I do not know why this error comes up.
email: money.marketing85@gmail.com
skype: phill.george
This is the php code
<?php
function twitterCapture() {
// Set your username and password here
$user = 'ENTER USERNAME HERE'; // Twitter Username
$password = 'ENTER PASSWORD HEREc'; // Twitter Password
$tw = curl_init("http://twitter.com"); //grabs the JSON format of your timelines
curl_setopt($tw,CURLOPT_TIMEOUT, 30); // Timeout (for when Twitter is down)
curl_setopt($tw,CURLOPT_USERPWD,$user . ":" . $password); // Uses your username and password
curl_setopt($tw,CURLOPT_RETURNTRANSFER,1); // returns
$json = curl_exec ($tw); // Executes the cURL and puts it into the varible
return $json; // returns what was grabbed
}
$cachefile = 'cache/twitterCache.json'; // the location to your cache file
$cachetime = 10 * 60; // set the cach time 10 * 60 (1 hour)
// if the file exists // if and the time it was created is less then cache time
if ( (file_exists($cachefile)) && ( time() - $cachetime < filemtime($cachefile) ) ) {
// script will not use the cached version
}else{ // the file didn't exist or is old
ob_start(); // turn on the output buffering
fwrite($fp, twitterCapture()); // writes to the file what was grabbed from the previouse function
fclose($fp); // closes
ob_end_flush(); // finishes and flushes the output buffer
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Little Twitter Widget</title>
<!-- Start of CSS -->
<link rel="stylesheet" type="text/css" href="css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
<!-- Start of JS -->
<script type="text/javascript" src="js/jquery-1.4.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</head>
<body>
<div id="twitter_widget_top" class="center" ></div><!-- The top of the widget -->
<div id="twitter_widget_body" class="center"> <!-- The body wrap -->
<div id="twitter_widget_tweet"> <!-- The tweet area -->
<div id="twitter_movement"> <!-- To position the icon reletive to -->
<a id="twitter_icon" href="http://twitter.com/"></a> <!-- Twitter icon -->
<div id="twitterWrap"> <!-- The blue area -->
<div id="twitter"> <!-- The main twitter data -->
<noscript>JavaScript must be on to view tweets</noscript> <!-- Incase no js -->
<p class="tweet">Loading...</p> <!-- The Tweet -->
<p class="created_at"></p> <!-- Date created -->
</div>
</div>
<p class="clear"></p> <!-- Clear the floats -->
</div>
<a href="" class="previous tweetNav"></a><!-- Next button -->
<p class="follow_me">Follow me - <a href="http://twitter.com/alexanderbor" class="screen_name"></a></p> <!-- Follow me link -->
<a href="" class="next tweetNav"></a> <!-- Pre button -->
<p class="clear"></p>
</div>
</div>
<div id="twitter_widget_bottom" class="center"></div><!-- Bottom of widet -->
<p class="info">Join my <span class="followedNumber"></span> followers - <span class="user_name"></span></p>
</body>
</html>
The 2nd Amendment, 1789 - The Original Homeland Security.
Gun control means never having to say, "I missed you."