PHP - Http_referer With Iframe
Hi there, i have 3 pages:
1. index.php 2. iframe.php 3. output.php iframe.php is within index.php and in iframe.php there's a form with input fields. Form is including output.php for sending the information. Whenever someone come to index.php, my HTTP_REFERER get's reffer of index.php instead of previously visited page (before my index.php)... how can i fix this? Please help! Similar TutorialsIS there a way to include the GETs for HTTP_REFERE? I often use it as a "go back" link but it doesn't include the GETs that were in the url which is a pain... Any ideas? This is what i use: Code: [Select] <a href="<?php echo $_SERVER['HTTP_REFERER'];?>">Go Back</a> I have a form that will e-mail a message that includes the referring page URL. The problem is that if someone makes a mistake on the form it changes the value of the referrer from the correct referring URL to the current page. Please help! Code: [Select] <input type="hidden" name="referer" value="<?php echo $_SERVER['HTTP_REFERER'] ?>" /> Hi,
I'm using this code to redirect visitors who are coming from another site (clicking on my ad on that site) to a page in my site where I can track them:
$referrer = $_SERVER['HTTP_REFERER']; if ( strstr($referrer, '://example.com/shop') ) print ('<meta http-equiv="refresh" content="0; URL=http://www.mysite.com/1.php">');The problem is that, by this code I can only redirect those who are coming from example.com/shop, but I need to redirect visitors coming from any sub directory or subdomain from example.com, not only a specific url in example.com Is there any solution? Thanks How can I get http_referer to retrieve the anchor in the url? It keeps url variables, but it does not get the anchor. Example: http://example.com/ex.php?id=10#tab=3 All http_referrer catches is http://example.com/ex.php?id=10 code: Code: [Select] $refer = $_SERVER['HTTP_REFERER']; <script type="text/javascript"> <!-- window.location = "<?PHP echo"$refer";?>" //--> </script> why does $_SERVER['HTTP_REFERER'] not get populated when a redirect is given using header( location:........) i am trying to redirect back to the login page if a user hasnot logged in yet but then re-direct back to the page they came from. I have an iFrame with a source location of www.google.com. If I browse to another page on Google.com, I can go to it, but cannot obtain the source of the page. Using JavaScript, I can only return the parent location, www.google.com Is there a way to return the current page URL of an iframe? Another idea is, using PHP, when the iframe makes a request to a new page, is there some way to return the request? Ex: if I browse to google.com/images, can PHP return that the server is trying to request that page? Hi on my site, i am using an iframe for google maps. When the map comes up it shows markers with information on - part of which is a "clickable" link. Problem is that the url opens in the iframe and i want it to open in a new window coz it goes to a completely different site. I tried putting the target=_blank in different parts of the code, but it just seems to stop everything from working and my google map vanishes ! HERES THE LINE OF CODE THAT I THINK I NEED TO CHANGE } if(v.website != '') { content_string += "<p class='web'>Website: <a href='"+v.website+"'>"+v.website+"</a></p>"; } Can anyone help? - i just want it to open a new window when people click on the hyperlink in the iframe - any suggestions please Brain chatframe.php Code: [Select] <? print "<center><iframe src='chatlog.php' name='chatlogframe' width='350' height='400'></iframe>"; print "<br><br>"; print "<iframe src='menu.php' width='350' height='150' frameborder='0'></iframe></center><br><br>"; ?> But actually im want to be as this as the login page is succesfuly direct to form 2 the iframe will be going below chat screen how can i do that? Hello. I'm using a PHP/CGI Upload Script -tesUpload. U can see the uploader at http://www.mintload.com/upload/upload-single.php As you can see, the percentage doesnt reload (its an iframe). On Firefox, if u right click on frame (0%) and select "open frame in new tab" or show only frame, u see it movin' and refreshing. Basically the iframe /fileprog.php calculates the percentage uploaded and refreshes itself to get new percentage every second. The code for upload-single.php is : <?php require_once("upload_helper.php"); $sid = md5(uniqid(rand())); ?> <html> <head> <script language="javascript" type="text/javascript" src="upload.js"></script> <link rel="stylesheet" href="upload.css" type="text/css" media="screen" title="Upload" charset="utf-8" /> <script language="javascript"> function beginUpload(sid) { document.postform.submit(); var pb = document.getElementById("progress"); pb.parentNode.parentNode.style.display='block'; new ProgressTracker(sid,{ progressBar: pb, onFailu function(msg) { Element.hide(pb.parentNode); alert(msg); } }); } </script> </head> <body> <form target="_top" enctype="multipart/form-data" name="postform" action="/cgi-bin/upload.cgi?sid=<?php echo $sid; ?>&target=<?php echo normal_target('receive.php') ?>" method="post"> <div class="inputhead">File 1</div> <input type="file" size="50" name="file_1" /><br/> </form> <div id="progressbox" style="display: none;"><img src="http://www.remit2home.com/remittance/images/mmm_loading.gif" alt="uploading..."> Uploading now... <div class="progresscontainer"><div class="progressbar" id="progress"></div></div> </div> <iframe src="http://mintload.com/upload/fileprog.php?sid=<?php echo $sid; ?>" width=50 height=50 frameborder=0 border=0 allowtransparency="true" ></iframe> uploaded <!--img src="http://www.remit2home.com/remittance/images/mmm_loading.gif" alt="uploading..."--> <!--iframe for percentage--> <p align="right"><input type="image" src="http://mintload.com/images/btn_upload.png" onclick="beginUpload('<?php echo $sid ?>');" alt="Upload" ></p> </body> </html> fileprog.php is alright. I need the percentage in iframe to refresh even when embedded onto upload-single.php Please help Thank you. Hello I am curious if it is even possible to get the domain when using iframes/frames? eg. domain2 shows a file from domain1 in an iframe. Can domain1 grab domain name "domian2"? Cant seem to get this to work. The variable does echo the url. What is the correct way to use the variable inside the iframe? $url = $db->loadResult(); <iframe src="<?php echo $url; ?>"width="450" height="259" frameborder="0" allowfullscreen></iframe> Is there a way of getting a variable from an iframe to the parent? There are many ways to pass a variable from the parent to the iframe, but I'm not sure if you can pass a variable from the iframe back to the parent. When i refresh/update the iframe, i want the updated/new variable "id_no" to be passed to the parent file (so I can put this value in a form field). I tried the code below, but have been unlucky. Code: [Select] document.getElementById("iframe").this.form.id_no.value; Any ideas? I'd like to pass a value from a URL to an iframe. This would look as follows: URL: http://www.mysite.com?www.mysite2.com The value (www.mysite2.com) will be an actual web address which should then be inserted into an iframe on www.mysite.com via php. Since I know little to no php, I don't know how the URL has to be structured and what php coding I need to use to include the web address in the iframe. Any suggestions are highly appreciated i am tryin to use google map iframe . the $ts4 and $ts5 from the db. Can i generate multiple markers if not can any1 direct me to a link to do so. <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.co.in/maps?f=q&source=s_q&hl=en&geocode=&q=<?php echo "$ts4,+$ts5"; ?>&ie=UTF8&hq=&hnear=<?php echo "$ts4,+$ts5"; ?>&z=14&iwloc=A&output=embed"></iframe> Thanks This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=319436.0 Hi. I am coding a project, and ability to browse other websites through a frame in this site is central to the project. However, I need to be able to have the href of the frame's current location which I can't do using an iframe. Does anyone know of any techniques using server-side php in which one can view other sites and keep track of the location of the other sides? Thanks, Phil HI im having a problem displaying an image in an iframe or img tag on my php page if i set the source to google it displays fine in the iframe! but if i set the source to a page on my server it doesnt display. It displays in both fire fox and chrome!???? Any help would be greatly appreciated Thanks Sean When displaying a webpage within iframe of facebook fan page, how I can detect that my page is viewed within the facebook iframe? I want to have a if else statement to change something within the page if it is viewed through facebook fanpage (not by direct visit). Im not sure if this is the correct section so sorry for that in advance, i have this URL on my website inside an iframe: http://gorillavid.com/cna/zwzcpyvcfi7j What im wanting to do is somehow either remove all the ads that are shown, or make sure all of the ads are muted and cant make any noise. is this possible? Seany |