Jump to content


Photo

Re: send page to friends help please


  • Please log in to reply
58 replies to this topic

#1 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 12:05 AM

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

#2 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 12:25 AM

wildteen why have you destroyed my post????

#3 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 02 September 2006 - 12:31 AM

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.

#4 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 12:33 AM

ok can you leave it alone now so hopefully i can get some help with my problem? >:(

#5 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 01:02 AM

bulk

#6 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 01:39 PM

any ideas on this??

#7 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 04:39 PM

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>


#8 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 September 2006 - 04:43 PM


echo"<img src='http://www.whatever.com/img.jpg'></img>";


Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#9 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 04:58 PM

hi redarrow thanks for this but are you suggesting i add this?? and if so where?? will this script copy the image url from my page??

#10 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 September 2006 - 05:19 PM

is that all the code wheres the rest like the mail code
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#11 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 05:31 PM

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/e...pagefriend.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";}



#12 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 September 2006 - 05:35 PM

still dont get it sorry please exsplain more sorry but the code looks very funny to me.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#13 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 05:37 PM

the rest of the code is here http://pastebin.com/782116

#14 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 05:48 PM

hi redarrow does the code still look funny or was this because i could not post it all at once?

#15 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 September 2006 - 05:52 PM


here is the rest of it-

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>

Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#16 redarrow

redarrow
  • Members
  • PipPipPip
  • Advanced Member
  • 7,308 posts
  • Locationlondon

Posted 02 September 2006 - 05:54 PM

so it's not showing the correct link or what then looks ok.

sure you tested this.
Wish i new all about php DAM i will have to learn
((EMAIL CODE THAT WORKS))
http://simpleforum.ath.cx/mail2.inc
((PAYPAL INTEGRATION THAT WORKS))
http://simpleforum.a...aypal1_info.inc

#17 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 06:15 PM

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/gall.../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/gall.../01/01/510.jpg" /></div>


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

any ideas how i could do this?

#18 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 06:27 PM

this link also show the same image so amybe this is what i need the script to copy?

<img src="http://www..com/imag...=500&#38;h=500" id="mainimage" alt="" />

thanks in advance.

#19 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 02 September 2006 - 06:30 PM

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.
Legend has it that reading the manual never killed anyone.
My site

#20 lounger

lounger
  • Members
  • PipPipPip
  • Advanced Member
  • 46 posts

Posted 02 September 2006 - 06:38 PM

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/imag...=500&#38;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...cture=510">Rate This Pic</a>
</span>
<br /><br />
<div style="text-align:center;font-size:9pt;">



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



<a href="http://www..com/gall...=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/imag...ges/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...user/?P=admin">
admin</a>
</div>

<a href="http://www..com/user...user/?P=admin">
<img src="http://www..com/memb...1/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/gall.../01/01/510.jpg" /></div>


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

i can use this source to diplay the image- http://www..com/imag...w=500&#38;h=500




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users