473,378 Members | 1,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

send a message

Hi

This maybe a nice little script for some new-newbies to get amongst a bit of
php action (I am still a newish-b myself)

http://www.sunnysideup.co.nz/clients/go.php

To follow is the PHP:

<?php

$content = '
<html>
<head>
<title>test me</title>
<script src="j/j.js" type="text/javascript"></script>
<style type="text/css"> img.iletter { display: none; } </style>
</head>';

$location = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];

if(($_POST["submit"] && $_POST["txt"]) || $x) {
$content .= '<body onload="reveal(\'l\', 1, 300);" style="margin: 0px;
padding: 50px; background-color: #000;">';
if($x) {
$letters = urldecode(base64_decode($x));
}
else {
$letters = htmlentities($_POST["txt"], ENT_QUOTES);
$code = urlencode(base64_encode($letters));
$content .= '<p style="color: white;">link is :
http://'.$location.'?x='.$code.'</p>';
}
$content .= letterer($letters).'<p style="clear: both;"><br><br><a
href="go.php" style="color: white;">try another one</a></p>';
}
else {
$content .= '
<body style="margin: 50px;">
<form method="post" action="go.php">
<textarea name="txt" cols="30" rows="10">type anything you want
here</textarea>
<br><br><input name="submit" type="submit" value="show me the money">
</form>';
}

function letterer ($letters) {
$v = '<div id="letters">';
$len = strlen($letters);
for($i = 0; $i < $len; $i++){
$let = substr($letters,$i, 1);
$let = replacer($let);
$v .= '<div class="iletter" id="divl'.($i+1).'" style="float: left";><img
src="a/'.strtolower($let).'.gif" alt="'.$let.'" class="iletter"
id="l'.($i+1).'"></div>'; //
}
$v .= '</div>';
return $v;
}

$content .= '</body></html>';
echo $content;
function replacer($letter) {

$search = array (
' ',
'?',
'>',
'<',
'*',
':',
'.',
);

$replace = array (
'_space',
'_questionmark',
'_gt',
'_lt',
'_asterix',
'_colon',
'_dot',
);

return str_replace($search, $replace, $letter);
}
?>
Aug 25 '05 #1
0 959

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Google Mike | last post by:
I've got RH9 Linux with default PHP. Is there a way to send email on Linux to an Exchange Server from PHP and/or other tools when there is *NOT* SMTP access? Has anyone figured out a way to...
9
by: Etienne Charland | last post by:
Hi, there is an application running on a remote desktop (under Citrix ICA, but the same problem applies for RDC or PC Anywhere). Now, I want to send keys to the remote application from a local app....
5
by: Pete Loveall | last post by:
I have a server application that monitors a private local queue for messages. The message sent to it has a label and a response queue defined. It works correctly when the queue is accessed via...
0
by: David Burson | last post by:
Hi, I have a VB.NET windows app that needs to automatically send a simple text email when my users run a new version of the app for the first time. I thought this would be simple, but after...
4
by: zhimin | last post by:
Hi, I'm writing a program to send large file(100m) through dotnet using TCPListener & TCPClient, I'm sending the file with a ask and response loop: 1. Client send a flag 1 to server indicate it...
13
by: Manfred Braun | last post by:
Hi All, I am trying to understand the blocking method socket.Send(). The call blocks as expected, but does this mean, it returnes after the underlying TCP layer got a confirmation, that the send...
1
by: michi | last post by:
Hi there.... Got here a tricky thing with my SMTP. First I show you what works on my machine.. **This Works** SmtpMail.SmtpServer = "mail.gmx.net" <-gmx is my mail provider...
3
by: Gerard | last post by:
Hello I have created a windows service to monitor a database, it starts some checks when a timer elapses. The checks send emails depending on their findings. My issue is that when I created a...
14
by: supz | last post by:
Hi, I use the standard code given below to send an email from an ASP.NET web form. The code executes fine but no Email is sent. All emails get queued in the Inetpub mail queue. I'm using my...
3
by: ultr | last post by:
Hello, I have read that send() may not send whole message and returns the nuber of bytes sent, so that we can handle the rest of the message. Is it true, because i have tested sending even 1MB...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.