Jump to content

Php question - Help With Entry


CAiNSTUHhh

Recommended Posts

Okay i would like to find a php script where, People can enter there friend ID and there picture URL .jpg or anything else. And it will show to everyone who goes to that website.

Like a myspace whore train joiner. Something like thatt. it can be simple. and i can make the template. Alll i need is the php script or anything needed

Link to comment
https://forums.phpfreaks.com/topic/169231-php-question-help-with-entry/
Share on other sites

Okay i would like to find a php script where, People can enter there friend ID and there picture URL .jpg or anything else. And it will show to everyone who goes to that website.

Like a myspace whore train joiner. Something like thatt. it can be simple. and i can make the template. Alll i need is the php script or anything needed

 

We are help to help with your code. Not provide you complete scripts.

 

http://www.rentacoder.com/RentACoder/DotNet/default.aspx

Okay i would like to find a php script where, People can enter there friend ID and there picture URL .jpg or anything else. And it will show to everyone who goes to that website.

Like a myspace whore train joiner. Something like thatt. it can be simple. and i can make the template. Alll i need is the php script or anything needed

Common man you are asking whole script?? First you come up with something, and we will guide if you have any problem. Just don't ask code, even if someone has done it, he will not give you that easily because he has worked hours and hours to make it work.

First try yourself and if you are stuck then we are ready to help

train.php

 
<?
function tg($action, $nick, $stuffsaid){
$talkdatafile = "Riders.txt";
$showtalks = "20";

if ($action == "talk") {
if(strlen($nick) >= 3){
  if(strlen($stuffsaid) >= 3){
$t_fp = fopen ($talkdatafile, "a+");
$talkdate = date("d/m/y");
$ip = getenv(REMOTE_ADDR);
$nicktwo = ereg_replace('<', ' ', $nick);
$nickthree = ereg_replace('>', ' ', $nicktwo);
$one_stuffsaid = ereg_replace('<', ' ', $stuffsaid);
$two_stuffsaid = ereg_replace('>', ' ', $one_stuffsaid);
$f_stuffsaid = stripslashes("$two_stuffsaid");
$f_nick = stripslashes("$nickthree");

if (is_alphachar($f_nick) == 1) {		
    		$error .= "Invalid User ID. Go Back!";
            echo $error;	
            exit;
    	}

$writedata = $talkdate."|".$f_nick."|".$f_stuffsaid."|".$ip."|"."\n";
$test_last = file($talkdatafile);
$test_lastr = array_reverse($test_last);
$last_e = $test_lastr[0];
       if($writedata != $last_e){
fwrite ($t_fp, $writedata);
fclose ($t_fp);
}
}
}
}



//EDIT THESE VARS
$bgcolor = "white";
$bordercolor = "black";
$height = "400";
$width = "200";
$font = "verdana";
$fontcolor = "blue";
$linkcolor = "blue";
$linkhover = "blue";
$inputtext = "blue";
$inputbackground = "#FFFFFF";
$inputborder= "#FF0000";



//DONT EDIT
echo "<html><head>\n"
."<style type=text/css><!-- input{background-color:$bgcolor;font-color:$fontcolor;font-family:$font;font-size:10px;} --></style></head>\n"
."<style type=text/css>\n"
."<!--\n"
."a:link.taglink{color:$linkcolor;font-family:$font;}\n"
."a:visited.taglink{color:$linkcolor;font-family:$font;}\n"
."a:hover.taglink{color:$linkhover;font-family:$font;}\n"
."input.tagput{color:$inputtext;font-family:$font;background-color:$inputbackground;border-color:$input-border;border-style:solid;border-width:1}\n"
."-->\n"
."</style>\n"
."<body bgcolor=$bgcolor>\n"
."<center>\n"
."<table border=0 cellpadding=0 cellspacing=0 bgcolor=$bgcolor>\n"
."<tr><td colspan=2>";echo "<table border=0 cellpadding=0 cellspacing=0 bgcolor=$bgcolor>\n"
."<tr><td>\n";echo "<table border=0 cellpadding=0 cellspacing=0 bordercolor=$bordercolor><tr><td bordercolor=$bgcolor>\n"
."<font face=$font color=$fontcolor size=1>\n";

$talks_temp = file($talkdatafile);

$talks = array_reverse($talks_temp);

//$showtalks = "20";

//http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendID=40269157
for ($t = 0; $t < $showtalks; $t++) {	
$talk_array = explode("|", $talks[$t]);	
echo "<b>".$talk_array[2]."</b> (<a href=\"http://collect.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=".$talk_array[1]."\" target=\"_blank\">Add</a> | <a href=\"http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendID=".$talk_array[1]."\" target=\"_blank\">View</a> )<BR> ";
}


echo "</tr></td></table>\n"
."</textarea>\n"
."</div>\n"
."</font>\n"
."</td></tr>\n"
."</table>\n"
."</table><BR>\n"
."<table cellpadding=3 cellspacing=3 border=0><tr><td>\n"
."<form action=\"".$PHP_SELF."\" method=\"post\"><font face=$font color=$fontcolor size=1>MySpace ID(0-9):\n"
."<td><input type=\"text\" name=\"nick\" class=tagput>\n"
."<tr><td><font face=$font color=$fontcolor size=1>Name(A-Z, 0-9):<td><input type=\"text\" name=\"stuffsaid\" class=tagput><br>"
."</table><input type=\"submit\" name=\"tagit\" value=\"Submit\" class=tagput>\n"
."<input type=\"hidden\" name=\"action\" value=\"talk\">\n"
."</form><BR>";
      

include("post.php");

echo "<font face=$font color=$fontcolor size=1><BR><BR>\n"
."<BR><BR><BR><BR>\n"
."</font>\n"
."</body>\n"
."</html>";
}


tg($action, $nick, $stuffsaid, $personsite);



function is_alphachar($text) {
    	

    for ($i = 0; $i < strlen($text); $i++) {
    	
    	if (!ereg("[0-9]", $text[$i])) {
    		return 1;
    	}
    }
    }
?>

 

Post.php

<style type=text/css>.MyTrain {display:none; visibility:hidden;}</style></form></script><form name="bulletinForm" action="http://bulletin.myspace.com/index.cfm?fuseaction=bulletin.confirm" target='_self' method="POST"><input type="hidden" name="groupID" value="0"><span class="MyTrain"><input type="hidden" name="subject" value="Open source myspace train." size="1" maxlength="50"><textarea name="body" type="hidden" style="width: 0px; height: 0px;"><? include("bullgen.php"); ?><p><a href="http://myspace.com/hackwood">Open source myspace train.</a></TEXTAREA></span><br><button type=submit class=tagput value="MyTrainA" name="submit" >Post Bulletin</button></form>

There's alot of things wrong with your script. First, remove completely ereg functions. Second, you don't have any $_POST variables (unless you have register globals set to on, which is a very bad idea).

 

Also, where you have :

<?php
for ($t = 0; $t < $showtalks; $t++) {   
$talk_array = explode("|", $talks[$t]);   
echo "<b>".$talk_array[2]."</b> (<a href=\"http://collect.myspace.com/index.cfm?fuseaction=invite.addfriend_verify&friendID=".$talk_array[1]."\" target=\"_blank\">Add</a> | <a href=\"http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendID=".$talk_array[1]."\" target=\"_blank\">View</a> )<BR> ";
}

 

Replace $talk_array[1] with $talk_array[0] and $talk_array[2] with $talk_array[1]. Arrays start at 0.

<?php

if(isset($_POST['submit')) {
$fp = fopen ("file.txt", "a+");
$name = $_POST['name'];
$myspaceid = $_POST['myspaceid'];

$info = $name . "|" . $myspaceid;
fwrite($fp, $info)
fclose($fp);
} else { //show the form 
?>

<form name="myspace_train_submitter" action="train.php" method="post">
Name: <input type="text" name="name" id="name" /><br />
Myspace ID#: <input type="text" name="myspaceid" id="myspaceid" />
<input type="submit" name="submit" value="Add »" />
</form>
<?php } ?>

 

That'll be $5.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.