help with passing query strings please

Associate
Joined
16 Feb 2008
Posts
307
Location
Staffordshire
Hi,

I have been having problems a while now but through determination I think Iam nearly there.

I have a regular html form, lets say "landingpage"
It then sends a query string to "anotherpage.php" and displays the result.

all good now

well the problem is that I can call for example google.com and display the search but if I change the Url to my required one it loads a default site.

here is the code:

landingpage:

Code:
<form method="post" action="landingpage.php"  target=content>
        <input type="text"  name="lookfor" value="Search"  />
        <input type="submit" value="Search"/>
</form>

anotherpage:

Code:
<?php
if(!empty($_POST['lookfor'])){
   $url = "http://google.com/search?q=".$_POST['lookfor']; 
   $content = file_get_contents($url);
   echo $content;
}
?>

now I need to replace the google url (which works) with this:

http://www.*********.co.uk/modules/shop/searchrated.asp?

Ok it dosnt work, it has to be a query string problem i figure, or is it because Iam calling .asp from php?


cheers guys
 
Back
Top Bottom