Jump to content

Api Twitter Search With Php


KewlAzMe

Recommended Posts

Hello together

I just found this thread (http://hak5.org/forums/lofiversion/index.php/t14597.html) on your forums for the twitter search. I tired this skript but sadly it doesn't work. I guess its because David Billingham updated the API functions.

Can someone help me with my problem?

The function should be that I enter my "searchword" and above the results will show.

For help Iam deeply grateful...

greetings Kewl

Link to comment
Share on other sites

Use the PHP class here and some other PHP code...

<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);

require 'search.class.php';

if(isset($_GET['string'])) {
    $string = $_GET['string'];
} else {
    $string = 'Hak5';
}


$search = new TwitterSearch($string);
$array = $search->results();

echo '<pre>';
print_r($array);
echo '</pre>';

?>

For your testing purposes. Just make sure that you don't include the debugging lines at the top when actually releasing. Also I've actaully set this up on my server so that you can have a fiddle with. Just go to http://stewartmalik.net/twitter/search.php by default it just searches Twitter for references to Hak5 however if you change a GET value say for example http://stewartmalik.net/twitter/search.php?string=Twitter then it will output the Twitter search for Twitter instead.

As an output it just show the Array.

Link to comment
Share on other sites

As in the webpage itself?

If that's the case then you'll need som CSS and Javascript, I suggest you use jQuery for your Javascript, it makes things a whole lot easier.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...