echo $_GET['hashtag'];
?>
 ')this.value='' "> 
                    
            <input class="btn btn-default" type="submit" value="Search Again!"/>
         </form>
        </div> <br>
        
<?php 
set_time_limit(0);
$link = peb_connect('Something@bryndlir-pinecone-2194177', 'abc');
if (!$link) {
    die('Could not connect' . peb_error());
}
$msg = peb_vencode('[~p,~a]', array(array($link, $_GET['hashtag'])));
peb_send_byname('pong', $msg, $link);
$message = peb_receive($link);
$rs = peb_vdecode($message);
$glans = call_user_func_array('array_merge', $rs);
$uses = $glans[1];
$twitter_id = $_SESSION["twitter_id"];
$theHashtag = $_GET['hashtag'];
//print_r($uses);
$query = "SELECT twitter_id FROM myhistory WHERE (twitter_id = '{$twitter_id}' AND hashtag = '{$theHashtag}')";
$doesExist = false;
$result = mysqli_query($db, $query);
if (mysqli_num_rows($result) > 0) {
    $doesExist = true;
} else {
}
if (!$doesExist) {
<?php

set_time_limit(0);
$link = peb_pconnect("bryndlir@127.0.0.1 ", "abc");
if ($link) {
    echo "linked!:" . $link . "<br>\r\n";
} else {
    echo "error:" . peb_errorno() . "<br>\r\nerror:" . peb_error() . "<br>\r\n";
}
echo "<br>\r\n";
echo "<br>\r\n";
peb_status();
echo "<br>\r\n";
echo "<br>\r\n";
$x = peb_vencode("[~a,~a]", array(array("hello", "friend")));
echo "msg resource :" . $x . "\r\n";
echo "<br>\r\n";
echo "<br>\r\n";
peb_send_byname("pong", $x, $link);
echo "<br>\r\n";
echo "<br>\r\n";
//peb_close($link);  You don't need to close pconnect :)
Beispiel #3
0
<?php

/** NOTE this requires the use of the mypeb PHP extension http://code.google.com/p/mypeb/ **/
echo "\n\nRUNNING MYPEB Erlang Bridge Tests\n\n";
$link = peb_connect('erlnode', 'secret');
echo "The link is: " . $link;
if (!$link) {
    die('Could not connect: ' . peb_error());
}
$msg = peb_encode('[~a,~p,~s]', array("echo", array($link, 'getinfo'), "Hello World"));
//The sender must include a reply address.  use ~p to format a link identifier to a valid Erlang pid.
peb_send_byname('erlnode', $msg, $link);
$message = peb_receive($link);
$rs = peb_decode($message);
print_r($rs);
$serverpid = $rs[0][0];
peb_close($link);