Jump to content

php not entering url into iFrame sites form


[-_-]

Recommended Posts

I'm trying make it easier for users of my site to surf thru many web proxys without going to each site and entering in the same url they are trying to visit. The problem is the form is not submitting the sites url that is entered in the form to the resulting iFramed external web proxy site. I would prefer to just have the url entered into the resulting websites form but not submitted on their site (because there are options people might want to set on the proxy site before submitting. ie:disable javascript, show refering site......)

 

Its the second search form I am trying to get to work.

http://www.plentyoftorrents.com/proxy/home2.php

 

So if someone enters http://www.google.com on this pages search form (home2.php) it should go to the next page with the same url (http://www.google.com) in surfcovertly.com's site.

 

Can anybody tell me what I am doing wrong?  ???

 

Heres the results_new.php

// grab the search query and request site from the url



if($_POST["q"]){

$q = $_POST["q"];

}else{

$q = $_GET['q'];

}


if($_POST['site']){

$site = $_POST["site"];

}else{

$site = $_GET['site'];

}



include('site_switch.php');

 

heres site_switch.php

 


// here we use a switch statement to define our url



switch ($site) {



case "surfcovertly":



    	$url = "http://surfcovertly.com/index.php?q=%3A%2F%2F". $q."&hl=340";



    break;

 

and heres the html

<!-- multi search -->

	<center><form name="search" action="results_new.php" method="post">


   <input type="text" name="q" id="multisearch" onclick="this.value=''"  value="Browse by Proxy"  />
   <br>
  
   <select name="site" id="multisearch">

    <option>surfcovertly</option>
<option>proxydevil</option>
<option>surfcovertly</option>
<option>surfcovertly</option>
  </select>
  
<input type="submit"  value="Browse" id="multisearch_button" />
</form>
</center>


	<!-- multi search -->

Link to comment
Share on other sites

I don't see anything you're doing wrong right away, though you could make this code a little more succint:

 

<?php 
if(!($q = $_POST["q"])){
  $q = $_GET['q'];
}

if(!($site = $_POST["site"])){
  $site = $_GET['site'];
}
?>

 

And I have a question. You don't manage surfcovertly, right? If not, how do you know how they're grabbing post values?

 

EDIT:

PS. I felt obligated to respond to this post because of ewok adventures... :P

Link to comment
Share on other sites

I don't see anything you're doing wrong right away, though you could make this code a little more succint:

 

<?php 
if(!($q = $_POST["q"])){
  $q = $_GET['q'];
}

if(!($site = $_POST["site"])){
  $site = $_GET['site'];
}
?>

 

And I have a question. You don't manage surfcovertly, right? If not, how do you know how they're grabbing post values?

 

EDIT:

PS. I felt obligated to respond to this post because of ewok adventures... :P

No I don't own their site. I don't know php either, someone helped me make this script for something else.

It works on this form for torrent sites so I figured it would work on the proxy sites. :P

http://www.plentyoftorrents.com

 

Ewoks pwn.  ;D

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.