Jump to content

Re: send page to friends help please


lounger

Recommended Posts

i have a send a page to your friends script on a web page in my site but this sends the recipient the browser url, this is bad because it means that when this url link is clicked the peson who clicked it is actually in the senders account and can cause lots of mischeif eg. delete files ect. what i need is the script to send the image url instead which is also shown on my web page but i do not know how to make the script use that url instead of the browser url.

http://pastebin.com/781694
Link to comment
Share on other sites

  • Replies 58
  • Created
  • Last Reply
I was trying something out and investigating why your post is failing. Leave the thread alone now. Dont attempt to post any code. Youc an edit the text in the first post though but leave the link. I did revert it back when I finished messing, but something happened.
Link to comment
Share on other sites

hers the rest of the code
i need to get the image url and not the browser url, how do i do this??
<?

?>

<!doctype html public "-//w3c//dtd html 3.2//en">

<html>

<head>
<title>(Type a title for your page here)</title>
<meta name="GENERATOR" content="Arachnophilia 4.0">
<meta name="FORMATTER" content="Arachnophilia 4.0">
</head>

<body bgcolor="#ffffff" text="#ffffff" link="#0000ff" vlink="#800080" alink="#ff0000">
<form method=post action=tellus.php>
      <table  border="0" cellpadding="0" cellspacing="0" align=center>
<tr bgcolor='#f1f1f1'><td colspan=2 align=center><font face='Verdana' size='2' ><b>TELL A FRIEND</b></font></td></tr>

<tr><td width=100><font face='Verdana' size='2' >Your Name</font></td><td width=200><input type=text name=y_name></td></tr>
<tr bgcolor='#f1f1f1'><td><font face='Verdana' size='2' >Your Email</font></td><td><input type=text name=y_email></td></tr>
<tr ><td><font face='Verdana' size='2' >Your Friend's Name</font></td><td><input type=text name=f_name></td></tr>
<tr bgcolor='#f1f1f1'><td><font face='Verdana' size='2' >Friend's Email</font></td><td><input type=text name=f_email></td></tr>
<tr ><td><font face='Verdana' size='2' >Your Message</font></td><td><textarea name=y_msg rows=5 cols=20></textarea></td></tr>

<tr bgcolor='#f1f1f1'><td colspan=2 align=center><font face='Verdana' size='2' ><input type=submit value='Send'></font></td></tr>
</table>
</form>


</body>

</html>
Link to comment
Share on other sites

sorry redarrow heres the mail code
thanks in advance -


<!doctype html public "-//w3c//dtd html 3.2//en">

<html>

<head>
<title>(.com)</title>

<meta name="GENERATOR" content="Arachnophilia 4.0">
<meta name="FORMATTER" content="Arachnophilia 4.0">
</head>

<body bgcolor="#330000" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<a href="http://www..com" target="_blank" ><BR><center><img src="http://.com/images/emailpagefriend.jpg" width="800" height="104" border="0" /></a>
<BR>
<BR>
<b>
<?
$status = "OK";
$msg="";
if (!stristr($y_email,"@") OR !stristr($y_email,".")) { // checking your email
$msg .="Your email address is not correct<BR>";
$status= "NOTOK";}

if (strlen($y_name) <2 ) { // checking your name
$msg .="Please enter your name<BR>";
$status= "NOTOK";}

if (!stristr($f_email,"@") OR !stristr($f_email,".")) { // checking friends email
$msg .="Your Friends address is not correct<BR>";
$status= "NOTOK";}

if (strlen($f_name) <2 ) { // checking freinds name
$msg .="Please enter your friend's name<BR>";
$status= "NOTOK";}

if (strlen($y_msg) <2 ) { // checking Message details
$msg .="Please enter your message details<BR>";
$status= "NOTOK";}

Link to comment
Share on other sites


here is the rest of it-
[code]

if($status=="OK"){ // all validation passed
/////////// Sending the message starts here //////////////
$ref=@$HTTP_REFERER;
/////Message at the top of the page showing the url////
$header_message = "Hi $f_name \n Your friend $y_name requested you to visit the page at \n $ref \n";
/// Body message prepared with the message entered by the user ////
$body_message =$header_message."\n".$y_msg."\n";
$body_message .="\n Get your FREE 25MB email address by visiting http://www..com";

//// Mail posting part starts here /////////

$headers="";
//$headers = "Content-Type: text/html; charset=iso-8859-1\n".$headers;
// Un comment the above line to send mail in html format
$headers4=$y_email;        // Change this to change from address
$headers.="Reply-to: $headers4\n";
$headers .= "From: $headers4\n";
$headers .= "Errors-to: $headers4\n";

$subject="Request to visit URL";

mail($f_email,$subject,$body_message,$headers);


////// Mail posting ends here ///////////
echo "<center><font face='Verdana' size='2' color=green>Thank You, Your message posted to $f_name</font></center>";

//////////// Sending the message ends here /////////////
}else{// display the error message
echo "<center><font face='Verdana' size='2' color=red>$msg</font></center>";
}
?>
<form><center><input type=button value="Back to .com gallery" onClick="history.back()"></form>
</body>

</html>
[/code]
Link to comment
Share on other sites

what it is redarrow is that it is working but it sends the address in the browser as a link and i need it to send the image url which is shown of every page in my gallery section, this is located further down on the same page. here is some code from my site that i need this script to pic up http://www..com/gallery/I/2005/01/01/510.jpg" here it is on my page -

</td>
</tr>
</table>

<div style="padding-top:4px;padding-left:10px;"><input type="text" size="70" name="url" value="http://www..com/gallery/I/2005/01/01/510.jpg" /></div>


</td>
</tr>
</table>

any ideas how i could do this?
Link to comment
Share on other sites

It seems as though what you want to do is 'send to a friend' the URL of an image by completing a form on the same page as the image is displayed. So ... how does the page displaying the image know what image to display? Once you know that, it'll be easy to send that URL information.  Until you do, it'll be impossible.
Link to comment
Share on other sites

hi andi this is the bit that i think your refering to -

<!-- START GALLERY AND ADDS -->
<table style="width:100%;" cellpadding="0" cellspacing="0">
<tr>
<td style="font-size:8pt;width:100%;vertical-align:top;" class="color">

<table style="width:100%;" cellpadding="0" cellspacing="0">
<tr>
<td style="width:75%;vertical-align:top;font-size:8pt;" class="color" id="table1">

<br />





<div style="text-align:center;">
<table style="margin-left:auto;margin-right:auto;"><tr><td>
<div class="wrap1" id="wp1">
<div class="wrap2" id="wp2">
<div class="wrap3" id="wp3">
<img src="http://www..com/image.php?gallery=LzUxMA==&amp;w=500&amp;h=500" id="mainimage" alt="" />

</div>
</div>
</div>
</td></tr></table>

<span style="padding-left:10px;">
<a href="#comment">Leave A Comment</a> | <a href="http://www..com/rate/?picture=510">Rate This Pic</a>
</span>
<br /><br />
<div style="text-align:center;font-size:9pt;">



<a href="http://www..com/gallery/view/?ID=511&CAT="> << Prev Pic</a> |



<a href="http://www..com/gallery/view/?ID=509&CAT=">Next Pic >>  </a>



</div>


</div>

<br />

<table style="width:100%;" cellpadding="0" cellspacing="0">
<tr>
<td style="vertical-align:top;font-size:8pt;width:5%;" class="color"></td>
<td style="vertical-align:top;font-size:8pt;width:90%;" class="color">



<table style="width:100%;" cellpadding="8" cellspacing="0" class="border13">
<tr>
<td style="font-size:8pt;" class="color">

<div style="font-size:10pt;">
<img src="http://www..com/images/spacer.gif" class="sqr" style="vertical-align:middle;" alt="" width="7" height="7" />
<b><u>sukshinder shinda2</u></b></div>

<table style="width:100%;" cellpadding="0" cellspacing="0">
<tr>
<td style="vertical-align:middle;font-size:8pt;width:60%;" class="color">

<div style="padding-left:8px;">
<div style="padding-top:4px;"><b>Date</b>: Aug 24, 2006 </div>
<div style="padding-top:4px;"><b>Views</b>: 4 </div>
<div style="padding-top:4px;"><b>Comments</b>: 0 </div>
<div style="padding-top:4px;"><b>Rating</b>: 1.00 </div>
<div style="padding-top:4px;"><b>Resolution</b>: 1024x768 </div>
<div style="padding-top:4px;"><b>Image Size</b>: 96.39 KBs </div>
<div style="padding-top:4px;"><b>Image URL/Location</b>:</div>


<font color="#ff0000"><b>Add this pic to your myspace/site/blog/email just Copy the code below and paste the code onto where you want it to appear :)</b></font>
</div>


</td><td style="width:40%;text-align:center;vertical-align:middle;">
<div style="padding-bottom:5px;"><a href="http://www..com/user/?P=admin">
admin</a>
</div>

<a href="http://www..com/user/?P=admin">
<img src="http://www..com/member/i/p/2005/01/admin_75.jpg" alt="" class="pic1" onmouseover="this.className='pic2';" onmouseout="this.className='pic1';"  width="75" height="75"/></a>

</td>
</tr>
</table>

<div style="padding-top:4px;padding-left:10px;"><input type="text" size="70" name="url" value="http://www..com/gallery/I/2005/01/01/510.jpg" /></div>


</td>
</tr>
</table>

i can use this source to diplay the image- http://www..com/image.php?gallery=LzUxMA==&amp;w=500&amp;h=500
Link to comment
Share on other sites

Pointing a browser at http://www..com/image.php?gallery=LzUxMA==&amp;w=500&amp;h=500

causes 'something' to happen (in image.php) to be able to generate this:

value="http://www..com/gallery/I/2005/01/01/510.jpg"

Whatever variable name holds that value is the variable name you want to include in the email. You'll need to look through the image.php script to see what that variable is named.
Link to comment
Share on other sites

andy here is the image.php code any ideas as to what i need??

if ( !defined('SECTION_MODE') )
{
define("PHPFOX_RUNTIME",TRUE);
define("PHPFOX_DIR","");
define("PHPFOX_SCRIPT","image");

if (!@include_once("phpfox_loader.php"))
{
die("<b>Fatal Error:</b> Cant Load phpfox_loader.php");
}

if (@$GLOBALS['phpfox_config']['error_reporting'])
{
error_reporting(0);
}
}

switch( $PHPFOX_SUB )
{

case 'image_verify':

ob_start();

$image = imagecreate(60, 30);

$bgColor = imagecolorallocate ($image, 255, 255, 255);

$textColor = imagecolorallocate ($image, 0, 0, 0);

imagestring ($image, 5, 5, 8,  $PHPFOX_ID, $textColor);

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");

header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

header("Cache-Control: no-store, no-cache, must-revalidate");

header("Cache-Control: post-check=0, pre-check=0", false);

header("Pragma: no-cache");   

header('Content-type: image/jpeg');

imagegif($image);

imagedestroy($image);

ob_end_flush();

break;
default:

if ( !empty($_GET['user']) )
{
$sub_source = ('member/i/p/'.$VAR[29].''. $_GET['user'] .'.jpg');
}

if ( !empty($_GET['gallery']) )
{
$sub_source = ('gallery/'.$VAR[17].''. base64_decode( $_GET['gallery'] ) .'.jpg');
}

if ( !empty($_GET['groups']) )
{
$sub_source = (''.$VAR[30].''. $_GET['groups'] .'.jpg');
}

$extra = "";

if ( !empty($phpfox_config['gd_watermark_image']) && !empty($phpfox_config['gd_watermark']) )
{
$total = ($_GET['w']+$_GET['h']);

if ( $total > 300 )
{
$extra .= "&fltr[]=wmi|". $VAR[5] ."/". $phpfox_config['gd_watermark_image_location'] ."|BL|";
}
}
else
{
if ( !empty($phpfox_config['gd_watermark']) )
{
$total = ($_GET['w']+$_GET['h']);
$fontsize = false;

if ( $total >= 500 )
{
$fontsize = 4;
}

if ( $fontsize )
{
$extra .= '&fltr[]=wmt|'. $phpfox_config['gd_watermark_text'] .'|'. $fontsize .'|BL|'. $phpfox_config['gd_watermark_color'] .'|';
}
}
}

header('Location: '. $VAR[0] .'/thumb/index.php?src='. base64_encode( ''. $VAR[5] .'/'. $sub_source .'' ) .'&w='. $_GET['w'] .'&h='. $_GET['h'] .'&q='. $phpfox_config['upload_set_quality'] .''. $extra .'');
exit;
break;
Link to comment
Share on other sites

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.