
rammac13
Members-
Posts
13 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
rammac13's Achievements

Newbie (1/5)
0
Reputation
-
Dynamically pulling data from one page to another
rammac13 replied to rammac13's topic in PHP Coding Help
Well I got the cURL to work. The Problem Is in all my Stats sites I and Others have to log in to be able to see them. I can't figure out a way to get past this. any Ideas? -
Dynamically pulling data from one page to another
rammac13 replied to rammac13's topic in PHP Coding Help
I am very new at PHP are there any cURL tutorials or file_get_contents() function........... or soap? -
What I want to do is dynamically get the information from one of my website statistic pages and put it into a table on another page. Is there a way to do this? Thanks
-
Ok so I think I am getting close. I am trying to put the title name (link) into a link on the page. but I am not sure how to call it correctly. I have javascript:tagLink in the a href link but that is not correct. What am I missing. Thanks. <html> <head> <title> link </title> <script type="text/javascript"> function getTagCloudLink() { var tagLink = document.getElementsByTagName("title")[0].innerHTML ; } </script> </head> <body> <p><a href="shop-enzy.com/store/index.html()">javascript:tagLink</a></p> </body> </html>
-
Ok so I think I am getting close. I am trying to put the title name (link) into a link on the page. but I am not sure how to call it correctly. I have javascript:tagLink in the a href link but that is not correct. What am I missing. Thanks. <html> <head> <title> link </title> <script type="text/javascript"> function getTagCloudLink() { var tagLink = document.getElementsByTagName("title")[0].innerHTML ; } </script> </head> <body> <p><a href="shop-enzy.com/store/index.html()">javascript:tagLink</a></p> </body> </html>
-
How do you make the title in PHP. I am new
-
Does anyone know of a way to detect what is in the title tag of a page? What I am attempting to do is have some code that will detect whatever the title of my page is and input it directly into a tag cloud that will be at the bottom of the page. Any Ideas? In any Language?
-
Does anyone know of a way to detect what is in the title tag of a page? What I am attempting to do is have some code that will detect whatever the title of my page is and input it directly into a tag cloud that will be at the bottom of the page. Any Ideas? In any Language?
-
I got it to work for a php page but all the pages I want to use the code on are html pages. I am trying to use a link that opens up a pop up that is tell_a_friend.php. I want a user to send an email that tells his/her friend about the exact page that the user clicked on the tell a friend link. Thanks for the help. I will just paste all my code and maybe someone will be able to show me where I am going wrong. here it is. Any help would be appreciated. This is the code for one of the html pages that will have the link to "tell_a_friend.php" <h2> Alphabetical: Ortho Molecular - M</h2> <table width="731" border="0"> <tr> <td width="422" height="78" valign="top"> <p><b></b></p> <hr> <p><b><font color="#CC6600">Alphabetical Search - Ortho Molecular Products</font></b></p> <p><b><a href="/store/ortho_4-5.html">4</a> <a href="/store/ortho_4-5.html">5</a></b> <b><a href="/store/ortho_a.html">A</a> <a href="/store/ortho_b.html">B</a> <a href="/store/ortho_c.html">C</a> <a href="/store/ortho_d.html">D</a> <a href="/store/ortho_e.html">E</a> <a href="/store/ortho_f.html">F</a> <a href="/store/ortho_g-h-i.html">G</a> <a href="/store/ortho_g-h-i.html">H</a> <a href="/store/ortho_g-h-i.html">I</a> J <a href="/store/ortho_k.html">K</a> <a href="/store/ortho_l.html">L</a> <a href="/store/ortho_m.html">M</a> <a href="/store/ortho_n.html">N</a> <a href="/store/ortho_o.html">O</a> <a href="/store/ortho_p.html">P</a> <a href="/store/ortho_q-r.html">Q</a> <a href="/store/ortho_q-r.html">R</a> <a href="/store/ortho_s.html">S</a> <a href="/store/ortho_t.html">T</a> <a href="/store/ortho_u-v.html">U</a> <a href="/store/ortho_u-v.html">V</a> W X Y Z<BR> <BR> </b></p> <hr> <p><b> </b></p> </td> <td width="292" valign="top"><a href="javascript:popup()"><img src="http://www.shop-orthomolecular.com/store/media/artimages/TellAFriend.gif" alt="Orthomolecular, Tell A Friend" width="174" height="43" border="0" ></a> <td width="3"></td> </tr> </table> And here is tell_a_friend.php: <?php /****************************************************************************** * Tell A Friend Script: * This script allows your visitors to sent invitation to their friends via email to visit your site. * * Usage: * The script comes with three files tell_a_friend.php, thankyou.html and install.txt * You're NOT allowed to redistribute or sell this script. * You are allowed to modify this script for your own personal use. * Please see install.txt attached in the zip for installation instructions. * * Notes: * If you like this script or used it for your website or project. * Please remember too link back to www.php-learn-it.com. * Your help is always appreciated. * * author: webdev (php-learn-it.com (or phplearnit.com) * Visit www.php-learn-it.com (or www.phplearnit.com) for more script and tutorials on PHP. *****************************************************************************/ //minimum characters allowed in the message box $msg_min_chars = "10"; //maximum characters allowed in the message box $msg_max_chars = "250"; $errors = array(); function validate_form_items() { global $msg_min_chars, $msg_max_chars; $msg_chars = "{".$msg_min_chars.",".$msg_max_chars."}"; $form_items = array( "name" => array( "regex" => "/^([a-zA-Z '-]+)$/", "error" => "Your name appears to be in improper format", ), "email" => array( "regex" => "/^[A-Za-z0-9](([_\.\-]?[a-zA-Z0-9]+)*)@([A-Za-z0-9]+)(([\.\-]?[a-zA-Z0-9]+)*)\.([A-Za-z]{2,})$/", "error" => "email address is invalid", ), "message" => array( "regex" => "/.*/", "error" => "Your message is either too short or exceeds $msg_max_chars characters", ), ); global $errors; if(!preg_match($form_items["name"]["regex"], $_POST["your_name"])) $errors[] = $form_items["name"]["error"]; if(!preg_match($form_items["email"]["regex"], $_POST["your_email"])) $errors[] = "your ".$form_items["email"]["error"]; if(strlen(trim($_POST["message"])) < $msg_min_chars || strlen(trim($_POST["message"])) > $msg_max_chars ) $errors[] = $form_items["message"]["error"]; if(trim($_POST["friend_email2"]) != "") { if(!preg_match($form_items["email"]["regex"], $_POST["friend_email2"])) $errors[] = "Friend 2 ".$form_items["email"]["error"]; } if(trim($_POST["friend_email3"]) != "") { if(!preg_match($form_items["email"]["regex"], $_POST["friend_email3"])) $errors[] = "Friend 3 ".$form_items["email"]["error"]; } return count($errors); } function email($from, $from_name, $to, $message) { //header("Location: thankyou.html");return; $headers .= "From: ".$from."\r\n"; $headers .= "Content-type: text/plain; charset=ISO-8859-1"; $your_domian_name = "shop-orthomolecular.com"; //edit what you want your vistors to see in their email here $subject = $from_name." sent you an invitation to $url"; $your_message = "Hi!\r\n"; $your_message.= ucfirst($from_name); $your_message.= " wants you to check out $url. This email was forwarded using a tell-a-friend feature. In cases of abuse, contact [email protected]\r\n\r\n\r\n\r\n"; $your_message.= "Sender's Message:\n\r"; $message=$your_message.stripslashes($message); if (mail($to,$subject,$message,$headers) ) { return true; } else { return false; } } function print_error($errors) { foreach($errors as $error) { $err.=$error."<br/>"; } echo "<div style=\"border:1px red solid; font-size:14px; font-weight:normal; color:red; margin:10px; padding:10px;\"> $err <div>"; } function form_process() { $refurl = $_SERVER['HTTP_REFERER']; print $refurl; $email=$_POST['email1']; $from_name = $_POST["your_name"]; $from_email = $_POST["your_email"]; $to = $_POST['email1'].",".$_POST["your_email"].",".$_POST["friend_email2"].",".$_POST["friend_email3"]; $message = $_POST["message"]; $error_count = validate_form_items(); if($error_count == 0) { if(email($from_email, $from_name, $to, $message)) header("Location: thankyou.html"); else { global $errors; $errors[] = "Email couldn't be send at this time. <br>Please report the webmaster of this error."; } } } if(isset($_POST["submit"])) form_process(); ?> <script type="text/javascript" src="http://www.plaxo.com/css/m/js/util.js"></script> <script type="text/javascript" src="http://www.plaxo.com/css/m/js/basic.js"></script> <script type="text/javascript" src="http://www.plaxo.com/css/m/js/abc_launcher.js"></script> <script type="text/javascript"><!-- function onABCommComplete() { // OPTIONAL: do something here after the new data has been populated in your text area } //--></script> <html> <title>php-learn-it.com - Email Form Script</title> <head> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function initMail(form) { text = "Check out this page: " + window.location; form.message.value = "Hi " + form.sendto.value + " (" + form.to.value + "):\n\n" + text + "\n\nYour Friend,\n" + form.sendername.value + "(" + form.senderemail.value + ")"; return (form.to.value!= ""); } // End --> </script> </head> <body><center> <form name=emailform method=post action="http://cgi.freedback.com/mail.pl" target="_new" onSubmit="return initMail(this);"> <input type=hidden name=subject value="** Check Out This Site! **"> <input type=hidden name=message value=""> <table> </table> </form> <form id="test" method="post" action="<? echo $_POST['self']; ?>"> <table border="0"> <tr> <td colspan="2" style="border-bottom:1px solid black;"> <font size="+2"><b>Tell A Friend</b></font> </td> </tr> <tr> <td colspan="2"> <?php global $errors; if(count($errors) != 0){ print_error($errors); } ?> </td> </tr> <tr> <td colspan="2"> <b>Friend's Email Address(es)</b>*<br/> <input type="text" name="email1" id="name" value="<? echo $_POST['self']; ?>"> <a href="#" onclick="showPlaxoABChooser('name', 'TellAFriend.html'); return false"><img src="/images/abc/buttons/add_button.gif" alt="Add from my address book"></a><br /><br /> </td> </tr> <tr> <td> <b>Your Name:*</b> </td> <td> <b>Your Email:*</b> </td> </tr> <tr> <td> <input type="text" name="your_name" id="name" size="20" maxlength="25" value="<?php echo $_POST["your_name"]?>"> </td> <td> <input type="text" name="your_email" id="email" size="31" maxlength="80" value="<?php echo $_POST["your_email"]?>"> </td> </tr> <tr> <td colspan="2"> <b>Friend 2 Email Address:</b><br/> <input type="text" name="friend_email2" id="name" size="56" maxlength="80" value="<?php echo $_POST["friend_email2"]?>"> </td> </tr> <tr> <td colspan="2"> <b>Friend 3 Email Address:</b><br/> <input type="text" name="friend_email3" id="name" size="56" maxlength="80" value="<?php echo $_POST["friend_email3"]?>"> </td> </tr> <tr> <td> <b>Message:*</b> </td> <td> <i>(max 250 characters allowed)</i> </td> </tr> <tr> <td colspan="2"> <textarea name="message" id="message" cols="42" rows="5"><?php echo $_POST["message"]?></textarea> </td> </tr> <tr> <td colspan="2" align="right"> <i>(* required fields)</i> <input type="submit" value="submit" name="submit" > </td> </tr> </table> </form> <form action="<? echo $_POST['self']; ?>" method="post"> </form> <tr><td> </td> </tr> <!-- Start of StatCounter Code --> <script type="text/javascript"> var sc_project=4080620; var sc_invisible=1; var sc_partition=49; var sc_click_stat=1; var sc_security="95f7c554"; </script> <script type="text/javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><div class="statcounter"><a title="web statistics" href="http://www.statcounter.com/free_web_stats.html" target="_blank"><img class="statcounter" src="http://c.statcounter.com/4080620/0/95f7c554/1/" alt="web statistics" ></a></div></noscript> <!-- End of StatCounter Code --> </body> </html> Thanks
-
So am I putting a link on mypage.php to tell_a_friend.php? or this code on the same page? I really am a newbie
-
$_SERVER['REQUEST_URI'] almost works but it takes me to the page that the form is on (tell_a_friend.php) and not the previous one that the user would click on to get to the form to pop up. That is the page they will be recommending. Any Ideas? Can I add anything to $_SERVER['REQUEST_URI'] to make it go to the previous URL?
-
but there is no browser understood command like $your_domian_name something like $_GET - where the URL is the page that the user is telling their friend about?
-
Hi I am new to PHP. I am trying to customize some Tell a Friend code I found. Is there an alternative to $your_domian_name. Instead of taking the user to shop-orthomolecular.com I want to be able to take the user to the actual page the another user is recommending Here is the code: $your_domian_name = "shop-orthomolecular.com"; //edit what you want your vistors to see in their email here $subject = $from_name." sent you an invitation to $your_domian_name"; $your_message = "Hi!\r\n"; $your_message.= ucfirst($from_name); $your_message.= " wants you to check out $your_domian_name. This email was forwarded using a tell-a-friend feature. In cases of abuse, contact [email protected]\r\n\r\n\r\n\r\n"; $your_message.= "Sender's Message:\n\r";