Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Hakuna's messagebox</title>
- <META HTTP-EQUIV="REFRESH" CONTENT="60">
- </head>
- <body bgcolor=#000000 text=#AAAAAA>
- <center><h1>Welcome to my message page!</h1></center>
- <center><img src="hakuna.jpg">
- <br>
- <br>
- Hi, my name is Hakuna and I'm a 16 year old girl. I live in the netherlands and
- love to look out of the window and sit on the balcony with my nose in the wind.
- In the picture above you can see me when I was 7 years old. I was lying cosy
- on my bed against the central heating when my slave decided to annoy me with
- bright flashes.<br>
- <br>
- You can leave me a message by sending "hakuna" followed by your message to +31 657 93 23 52 . You message should appear in the list below within the minute :)
- <br><br><br>
- <?php
- $dbcon=pg_connect("host=localhost user=dbuser dbname=smsdb password=mypass");
- if (!$dbcon) {
- print "Connection to database failed: " . pg_last_error();
- print "</body>\n</html>\n";
- exit;
- }
- $sql="select smsdate,number,text from inbox where upper(text) like 'HAKUNA%' order by smsdate DESC";
- $result = pg_query($dbcon, $sql);
- $error = pg_last_error();
- ?>
- <center><table>
- <TH width=40% align=left>Date/Time</TH>
- <TH width=60% align=left>Message</TH>
- <!-- <TH width=20% align=left>Countrycode</TH> -->
- <?php
- while(list($smsdate, $number, $text) = pg_fetch_row($result)) {
- $number = substr(strip_tags($number), 0, 3);
- $text = substr(strip_tags($text), 7, strlen($text)-7);
- print " <TR>\n";
- print " <TD>$smsdate</TD>\n";
- print " <TD>$text</TD>\n";
- #print " <TD align=right>$number</TD>\n";
- print " </TR>\n";
- }
- pg_close($dbcon);
- ?>
- </table></center>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement