PHP - External Site Link With Http:// (url Link)
hi hope you all are fine.
i have been working on a Email Form (like user fills up the form which send the information to our email) but i was having problem with (URL field i created) link of form is (http://services.shadowaura.com/allquotations/static.php) field which is not working is "Inspirational Website:" when i submit the form it says (Forbidden You don't have permission to access /allquotations/staticworking.php on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.) Can some one help me out ????????????? code behind this form is: Code: [Select] <?php /* Email Variables */ $emailSubject = 'Shadow Aura Contact Info!'; $webMaster = '*****@shadowaura.com'; /* Data Variables */ $Name = $_POST['Name']; $email = $_POST['email']; $Cell = $_POST['Cell']; $Phone = $_POST['Phone']; $CompanyName = $_POST['CompanyName']; $TypeOfBusiness = $_POST['TypeOfBusiness']; $Address = $_POST['Address']; $YourBudget = $_POST['YourBudget']; $HaveDomain = $_POST['HaveDomain']; $RunningWeb = $_POST['RunningWeb']; $WebLink = $_POST['WebLink']; $Inspiration1 = $_POST['Inspiration1']; $Inspiration2 = $_POST['Inspiration2']; $NumberPages = $_POST['NumberPages']; $UseFlash = $_POST['UseFlash']; $TimeFrame = $_POST['TimeFrame']; $Provided = $_POST['Provided']; $Comments = $_POST['Comments']; $body = <<<EOD <h1> Static Website Quotation </h1> <br> <b>Name of Client:</b>$Name<br> <b>Your Email:</b>$email<br> <b>Cell Number:</b>$Cell<br> <b>Line Phone Number:</b>$Phone<br> <b>Company Name:</b>$CompanyName<br> <b>Type of Business:</b>$TypeOfBusiness<br> <b>Address:</b>$Address<br> <b>Your Budget:</b>$YourBudget <br> <b>Do you have Domain:</b>$HaveDomain<br> <b>Your Site is Running:</b>$RunningWeb <br> <b>Website Link:</b><a href="$WebLink">$WebLink</a><br> <b>Inspiration:</b>$Inspiration1<br> <b>2nd Inspiration:</b>$Inspiration2<br> <b>Number of Pages:</b>$NumberPages<br> <b>Use Flash:</b>$UseFlash <br> <b>Time Frame:</b>$TimeFrame<br> <b>You will provide:</b>$Provided<br> <b>Comments:</b>$Comments<br> EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); /* Results rendered as HTML */ $theResults = <<<EOD <html> <head> <title>sent message</title> <meta http-equiv="refresh" content="3;URL=http://services.shadowaura.com/"> <style type="text/css"> <!-- body { background-color: #8CC640; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 20px; font-style: normal; line-height: normal; font-weight: normal; color: #fec001; text-decoration: none; padding-top: 200px; margin-left: 150px; width: 800px; } --> </style> </head> <div align="center">Your email will be answered soon as possible! You will return to <b>Shadow Aura Services</b> in a few seconds !</div> </div> </body> </html> EOD; echo "$theResults"; ?> Similar Tutorialsi have a database field called photo. it is used to generate photo id in a software progam for our soccer league. I also want to be able to view the photo on our approval page. could someone help me with the coding of the http h-link? i am having issues with it. the photo field has the following paramaters: images/picture.jpg i want the link on the approval page to look like this: <a href="http://bccsl.org/managers/images/picture.jpg">"http://bccsl.org/managers/images/picture.jpg</a> thanks stefan Code: [Select] <?php /* connection and protection */ include 'dbc.php'; page_protect(); mysql_query( "SET NAMES utf8" ); if(isset($_POST["update"]) AND isset($_POST["hiddenid"])) { $updated=false; $activateapproved=array(); $deactivateapproved=array(); foreach($_POST["hiddenid"] AS $value) { if(isset($_POST["checkboxapproved"][$value])) $activateapproved[]=intval($value); else $deactivateapproved[]=intval($value); } if(count($activateapproved)>0) { $SQL=sprintf("UPDATE players SET approved=1 WHERE id in (%s)" , implode(",", $activateapproved)); mysql_query($SQL) OR DIE(mysql_error()); $updated=true; } if(count($deactivateapproved)>0) { $SQL=sprintf("UPDATE players SET approved=0 WHERE id in (%s)" , implode(",", $deactivateapproved)); mysql_query($SQL) OR DIE(mysql_error()); $updated=true; } if($updated==true) { header("Location: ".$_SERVER["PHP_SELF"].""); exit(); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Player Approval</title> <script type="text/javascript" src="public_smo_scripts.js"></script> <link href="styles.css" rel="stylesheet" type="text/css"> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="5" class="main"> <tr> <td colspan="3"> </td> </tr> <tr> <td width="160" valign="top"> <? include 'menu.php'; ?> <p> </p> <p> </p> <p> </p> <p> </p></td> <td width="732" valign="top"><p> </p> <?php if(isset($_GET["todo"]) AND $_GET["todo"]=="updated") { echo "Updated succesfully"; } ?> <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="post" name="Form"> <table border="1" cellpadding="2" cellspacing="2"> <tr> <td><div align="center">First</div></td> <td><div align="center">Last</div></td> <td><div align="center">Address</div></td> <td><div align="center">City</div></td> <td><div align="center">Postal</div></td> <td><div align="center">Phone #</div></td> <td><div align="center">Feet</div></td> <td><div align="center">Inches</div></td> <td><div align="center">Weight</div></td> <td><div align="center">Birthdate</div></td> <td><div align="center">Team ID</div></td> <td><div align="center">Type</div></td> <td><div align="center">photo</div></td> <td><div align="center">Date Added</div></td> <td><div align="center">Approved</div></td> </tr> <?php $sql="select * from players where teamid='$_POST[teamid]' order by status ASC"; $res=mysql_query($sql) or die(mysql_error()); while($r=mysql_fetch_assoc($res)) { ?> <tr> <input type="hidden" name="hiddenid[]" value="<?php echo $r["id"]?>"> <td> <div align="center"><?php echo empty($r["first"])?' ':htmlspecialchars($r["first"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["last"])?' ':htmlspecialchars($r["last"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["address"])?' ':htmlspecialchars($r["address"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["city"])?' ':htmlspecialchars($r["city"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["postal"])?' ':htmlspecialchars($r["postal"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["phone"])?' ':htmlspecialchars($r["phone"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["feet"])?' ':htmlspecialchars($r["feet"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["inches"])?' ':htmlspecialchars($r["inches"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["weight"])?' ':htmlspecialchars($r["weight"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["birth"])?' ':htmlspecialchars($r["birth"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["teamid"])?' ':htmlspecialchars($r["teamid"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["status"])?' ':htmlspecialchars($r["status"]); ?> </div></td> <td> <div align="center"><?php echo empty($r["photo"])?'<a href="http://bccsl.org/managers/:htmlspecialchars($r["photo"])</a>'; ?> </div></td> <td> <div align="center"><?php echo empty($r["dateadded"])?' ':htmlspecialchars($r["dateadded"]); ?> </div></td> <td> <div align="center"> <input type="checkbox" name="checkboxapproved[<?php echo $r["id"]?>]" value="1"<?php echo empty($r["approved"])?'':' checked="checked"'; ?> /> </div></td> </tr> <?php } ?> </table> <p> <input type="checkbox" name="checkall" onclick="checkUncheckAll(this);"/> select/unselect <input type="submit" value="update" name="update"> </p> </form> <table width="178" border="1" cellpadding="0" cellspacing="1"> <tr> <th colspan="2" scope="col">Type</th> </tr> <tr> <td width="113"><div align="center">Church Player</div></td> <td width="50"><div align="center">1</div></td> </tr> <tr> <td><div align="center">Import Player</div></td> <td><div align="center">2</div></td> </tr> <tr> <td><div align="center">Witness Player</div></td> <td><div align="center">3</div></td> </tr> </table> </td> <td width="196" valign="top"> </td> </tr> <tr> <td colspan="3"> </td> </tr> </table> </body> </html> <a href="http://bccsl.org/managers/">http://bccsl.org/managers/</a> I know basically nothing about PHP but i have a few websites i manage that are built with PHP. I plan to learn PHP but for the time being learning Javascript has a wider range of usability for me. That being said, Im trying to link to an XML sitemap using php. in html i would use Code: [Select] <link href="sitemap.xml" /> how can i do this in PHP? I have searched google and such for how to do this but was unable to find an explanation that i could understand as relating to my need. How do I only redirect the page when index.php is present? Hello, I am trying to make the buy product button on all single product pages to open in a popup iframe or simular! I am new to java, php and such and I am looking for how to achieve this?
I have been researching this for over a month and nothing seems to work. I am affiliated with Amazon so I need my woocommerce buy product buttons to open a new smaller popup window in front of my site!
I have already had it set to open as _blank, But I really need all my external product button links to open as a popup! Is this possible? I have tried editing cart.php and I know nothing about java. Please help!!
Thank you in advance,
Dee
in need of an external link counter script! please help cheers matt Folks, When someone click on a link on my webpage and if that Link takes the visitor off my site, then i want to make an entry in my database. But if that link goes back to some other link in my Site then i do not want to Count that link. So, is there any code that lets me detect any outgoing link Click? Cheers Hello Everyone, I'm using PHP with MySQL. One of the fields in the database is website. The code I'm using is as follows: variable: $web=mysql_result($result,$i,"web"); html/php code: <td><font face="Arial, Helvetica, sans-serif"><a href="<? echo "$web"; ?>">Website</a></font></td> What it should do is have the clickable word Website with the correct url from the database. Instead it's repeating the website the page is on. For example it's doing this: http://mywebsite/www.enteredwebsite.com Any help is appreciated. Hi I've got this database I created with fields ProductId ProductName Image I've managed to get it to list the ID,productname, and Image urls in a list. My next step is to have the image field actually display an image and make it clickable: heres what I've done so far: Code: [Select] <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("productfeed", $con); $result = mysql_query("SELECT * FROM productfeeds"); echo "<table border='0'> <tr> <th>Firstname</th> <th>Lastname</th> <th>Image</th> </tr>"; while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['ProductID'] . "</td>"; echo "<td>" . $row['ProductName'] . "</td>"; echo "<td>" . $row['ImageURL'] . "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> Heres what I want to do: Code: [Select] while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['ProductID'] . "</td>"; echo "<td>" . $row['ProductName'] . "</td>"; // my changes beneath echo "<td>" . <a href="<?php echo $row['ImageURL'];?>"> <img src="<?php echo $row['LinkURL']; ?>"> </a>. "</td>"; echo "</tr>"; } echo "</table>"; mysql_close($con); ?> Can you guys point me in the right direction? Many thanks Hello.
I have a bit of a problem. When I fetch the link field from the database.i don't see an actual link on the page.
One more thing, what type of field should I use to store the link in the database? Probably there is where I went wrong.
All help is
Hi Support, I have a form, where it collects user description input. I can collect the inputs and store it with newline. The issue is - how to collect the http link to actual hyperlink ref during display. The following is my code: <textarea name="description" cols="50" rows="10" id="description"><?php echo str_replace("<br>", "\n", $description);?></textarea></td> For example, User input: Hi, Check it out - http://www.google.com/ I would like to display google link as href so that Viewers can click the link and go to the page. Right now, it is not href and user need to copy the link to new tabs or pages and then it can come. Thanks for your help. Regards, Ahsan here's my code that i've used to send an email. Code: [Select] $link = "<a href=\"http://www.example.com/" . $num . "\">" . $num . "</a>"; $query = "SELECT content FROM emails"; $result = mysql_query($query) or die(); $email_content = mysql_result($result, 0); $email = sprintf($email_content, $first, $name, $from, $link, $record, $rec, $inc, $max); $email_body = stripslashes(htmlentities($email, ENT_QUOTES, 'UTF-8')); // this is sent to another php script via post.... $subject = $_POST['subject']; $message = nl2br(html_entity_decode($_POST['email_body'])); $to = "me@whatever.com"; $charset='UTF-8'; $encoded_subject="=?$charset?B?" . base64_encode($subject) . "?=\n"; $headers="From: " . $userEmail . "\n" . "Content-Type: text/html; charset=$charset; format=flowed\n" . "MIME-Version: 1.0\n" . "Content-Transfer-Encoding: 8bit\n" . "X-Mailer: PHP\n"; mail($to,$encoded_subject,$message,$headers); in the db, emails.content is of the text type and contains several lines of text with %4$s which inserts the value of $link into the body. when the email arrives, there is a link and it appears fine, with the value of $num hyperlinked. however when you click on it it doesn't go anywhere. when copying the link location from the email it gives me x-msg://87/%22http://www.example.com/16 what is x-msg? how can i get this to work properly? I have a line like this it prints text link but I prefer image link how should i edit it I would appreciate some feedback Code: [Select] $templates['etiket'] = array('name' => t('ETİKET'), 'module' => 'uc_invoice_pdf', 'path' => $templates_uc_invoice_pdf_path, 'pdf_settings' => $pdf_settings); Hi guys, I'm using a twitter script that grabs the title and publishings it like so: "Title - Read More at..." I was wondering how i would be able to post the direct link into twitter.. like news.php?id=1 for example. Code: [Select] $tweet->post('statuses/update', array('status' => ''.$_POST[title].' - more at MY URL')); This part is in the script to publish automatically when the users adds to the news database. How am i able to get the ID just after the posting of the news? Thanks! I'm currently running a classified ads site and planning to display my own content from database combined with and external site rss. So here is what i got right now after the db query for the jobs ads (procedural php),
while ($row = mysqli_fetch_array($results, MYSQLI_ASSOC)){ echo '<div class="media margin-none"> <a class="pull-left bg-inverse innerAll text-center" href="#"><img src="'.$foto.'" share_alt="" width="100" height="100"></a> <div class="media-body innerAll"> <h4 class="media-heading innerT"> <a href="' . $row['title'] .'-da' . $row['id_ad'] . '" class="text-inverse">'. $remuneracion .' ' . substr(ucfirst(strtolower($row['title'])), 0, 53) . '</a> <small class="pull-right label label-default"><i class="fa fa-fw fa-calendar-o"></i> ' . $row['date_created'] . '</small></h4> <p>' . substr(ucfirst(strtolower($row['description'])), 0, 80) . ' ...</p>'; echo '</div> </div> <div class="col-separator-h"></div>'; } echo pagination($statement,$per_page,$page, $url_filtros, $filtros); ?>it is the while loop that i use to display ads from my database, what could be the best way to display (in this same loop?) other site's rss feed so i can show my content combined with the external rss? Thanks Dear, I have page1.php where there is a iframe with source page2.php. How can I read page2.php? Both the pages are in external website, and if I directly point www.thatsite.com/page2.php, it shows blank page (no error). But if I load www.thatsite.com/page1.php in FIREFOX and use SAVE FRAME AS function, it does save page2.php successfully. Thanks, Hello guys, I currently have a problem with echoing text coming from an external site, using file_get_contents. I won't consider myself a great PhP programmer, so I'll gladly appraciate any help! The code I am using is very simple: <?php $homepage = file_get_contents('http://www.live365.com/scp/web/stn/playlist.html?station=kolonku'); echo $homepage; ?> However, the result comes out blank. If I change the link to a page made out of HTML, the code works, but the text here is a tracklist of a Live365 radio station. It changes dynamically according to what song is currently playing. I guess the code behind all this is formidable, to say the least, and I can't tell if it's made out of Javascript or PhP, or something else. Is there any way that I can solve this? I was thinking of getting the contents, then have the function updating every 10 seconds or so, so that the text is up to date most of the time. The current problem however, is getting something at all in the first place! Link to the site I want to get the contents from (it updates atomatically! The source code won't give me a clue to what's going on..): http://www.live365.com/scp/web/stn/playlist.html?station=kolonku I have a website that lists courses. I want each tutor to be able to add a piece of code that will display upcoming courses on their website. I am unsure of the best, secure way to do this. Could I simply create a file with a function and allow the tutor to add this to their site something like: <? include "http://www.mysite.com/showCourses.php?user=peterPan; ?> This showCourses.php would connect and query my database, would this work? I have been given a task, and I gotta say it is kicking my butt.
Here is what I have to do.
1. Have user fill out and submit a form.
2. Data gets sent to: http://www.ffiec.gov...de/Default.aspx
3. Data is set as values for input fields in the sites form.
4. Form executes.
5. Retrieve result data.
6. Display data back to my site.
I have no idea how to do this.
Usually when I have done something like this I use an API.
Hope my question is clear.
Thanks for the help.
Trying to run a simple program that, when submitted, stores the username and password as cookies. When clicking Submit, I get the error "HTTP Error 405 - The HTTP verb used to access this page is not allowed". If the username and password fields are left blank when submitting it's suppose to give a message to enter a username and password, but, I still get that error message. HTML form: Code: [Select] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Week 1 Project--Cookies</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <form action="cookie1.php" method="post"> <h2 align="center">Cookies</h2> <br /> <div> <p>Enter your username and password and click "Submit":</p><br /> <p>Username:<input type="text" name="username" size="20"></p> <p>Password:<input type="text" name="password" size="20"></p> </div> <br /> <div><input type="submit" name="submit" value="Submit" /></div> <br /> <div> <input type="reset" name="Reset" value="Start Over" /> </div> </form> </body> </html> PHP file: Code: [Select] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Cookie File</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <div> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { setcookie('username', $_POST['username'], time() + 2592000); setcookie('password', $_POST['password'], time() + 2592000); } if(($_POST['username'] == "") || ($_POST['password'] == "")) { print "You must enter both a username and password. Press the Back button on your browser and try again."; } else if (isset($_COOKIE['username'])) { print "Welcome, " .$_COOKIE['username']; } ?> </div> </body> </html> I'm trying to send a submission to the following Craigslist form that uses javascript to trigger an auto submit. The user selects "For Sale" on my form and it will pass the data in a hidden div to the proper selection on the craigslist page. Heres the page it would be passing to. I know I will have to pass it in the URL. Code: [Select] <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <base href="https://post.craigslist.org"> <title>houston craigslist | choose type</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link type="text/css" rel="stylesheet" media="all" href="/styles/craigslist.css?v=9"> </head> <body id="pp"> <table width="100%" id="header" summary="header"> <tr valign="top"> <td><a href="http://houston.craigslist.org/"><b>houston craigslist</b></a> > choose type<br></td> <td width="10%" class="highlight" style="text-align: right; white-space: nowrap;"> <font size="2" face="sans-serif" color="#7a7a7a">[ logged in as <a href="https://accounts.craigslist.org/login"><b>kennymahaffey@gmail.com</b></a> ] [ <a href="https://accounts.craigslist.org/logout">logout</a> ]</font> <br></td> </tr> </table> <hr> <blockquote> <div class="highlight"> <i>Please post to a single geographic area and category only -- cross-posting to multiple cities or categories is not allowed</i> </div> <h4>What type of posting is this:</h4> <form action="https://post.craigslist.org/k/kInfxI4M4RGIA7PWTF5SWg/HjdlJ" method="POST"> <blockquote> <label> <input type="radio" name="id" value="jo" onclick="form.submit(); return false;">job offered </label> <br> <label> <input type="radio" name="id" value="jw" onclick="form.submit(); return false;">resume / job wanted </label> <br> <br> <label> <input type="radio" name="id" value="ho" onclick="form.submit(); return false;">housing offered </label> <br> <label> <input type="radio" name="id" value="hw" onclick="form.submit(); return false;">housing wanted </label> <br> <br> <label> <input type="radio" name="id" value="fs" onclick="form.submit(); return false;">for sale </label> <i>(please do not post prohibited <sup><a target="_blank" href="http://www.craigslist.org/about/prohibited.items">[?]</a></sup> or recalled <sup><a target="_blank" href="http://www.craigslist.org/about/recalled_items">[?]</a></sup> items)</i> <br> <label> <input type="radio" name="id" value="iw" onclick="form.submit(); return false;">item wanted </label> <br> <br> <label> <input type="radio" name="id" value="go" onclick="form.submit(); return false;">gig offered </label> <i>(I'm hiring for a short-term, small or odd job)</i> <br> <label> <input type="radio" name="id" value="so" onclick="form.submit(); return false;">service offered </label> <br> <br> <label> <input type="radio" name="id" value="p" onclick="form.submit(); return false;">personal / romance </label> <br> <br> <label> <input type="radio" name="id" value="c" onclick="form.submit(); return false;">community </label> <br> <label> <input type="radio" name="id" value="e" onclick="form.submit(); return false;">event </label> <br> <br> </blockquote> <input type="hidden" name="U2FsdGVkX:18yNDg2NDI0O:A8dZroeLa8K5Y677RwK4hzBe2OPdD3XxLUDb5lS9LllELhxNpMqXZIwAWDxJ.7Wo4A" value="U2FsdGVkX18yNDg2NDI0OFjS1qgWn_NKgmgnh5qCZ9aK2m7eOmS-uAAM_Pwu8VHN"> <button type="submit" name="go" value="Continue">Continue</button> </form> </blockquote> |