Jump to content

help...


phpSensei

Recommended Posts

http://www.flash-portal.org/fpslay/codedfp/po/

 

As you can see thats my proxy web server i am making, BUT!!! When someone types a site, the site shows fine but when he or she clicks a link, the proxy ends and it goes to another webpage.

 

www.hidemyass.com has the link in a HTTP_POST_VARS or something, how do i do this?

Link to comment
https://forums.phpfreaks.com/topic/77396-help/
Share on other sites

Are you including the page in your page or using frames?

Anyway I might be wrong but I think you may have to rewrite all the links on the page that you are opening to go through your proxy.

 

here is the code, and re-writting the links wouldnt make sense....

 

<?php
$url = $_POST['name'];
ob_start();
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_VERBOSE, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($curl);
   $cache = ob_get_contents();
   ob_end_clean();

// check for errors
if (curl_errno($curl))
{
trigger_error('<span class="style5">Sorry, the url you entered was not valid.</span>');
}
curl_close($curl);
abs(crc32($cache));
echo $cache;
echo $output;
?>

Link to comment
https://forums.phpfreaks.com/topic/77396-help/#findComment-391819
Share on other sites

I got the links thingy fixed and everything is fine, except when i get the "?website=", it gives me the site with quotes around the HTTP_POST_VARS, how do you remove quotes from

 

?id="dfdfsdf"

 

<?php


if(!isset($_GET['website'])){

$url = $_POST['name'];

}
else
{

$url = htmlentities($_GET['website'], ENT_QUOTES); 

}
ob_start();
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_VERBOSE, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($curl);
   $cache = ob_get_contents();
   ob_end_clean();

// check for errors
if (curl_errno($curl))
{
trigger_error('<span class="style5">Sorry, the url you entered was not valid.</span>');
}
curl_close($curl);
abs(crc32($cache));
echo $cache;
echo str_replace('<a href=','<a href=http://www.flash-portal.org/fpslay/codedfp/po/completeRequest.php?website=', $output);
?>

Link to comment
https://forums.phpfreaks.com/topic/77396-help/#findComment-391843
Share on other sites

I did, now the image links are broken again...

 

<?php


if(!isset($_GET['website'])){

$url = $_POST['name'];

}
else
{

$url = str_replace('"','',$_GET['website']); 
$url = stripslashes($url);

}
ob_start();
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_VERBOSE, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($curl);
   $cache = ob_get_contents();
   ob_end_clean();

// check for errors
if (curl_errno($curl))
{
trigger_error('<span class="style5">Sorry, the url you entered was not valid '.$url.'</span>');
}
curl_close($curl);
abs(crc32($cache));
echo $cache;
echo str_replace('<a href=','<a href=http://www.flash-portal.org/fpslay/codedfp/po/completeRequest.php?website=', $output);
?>

Link to comment
https://forums.phpfreaks.com/topic/77396-help/#findComment-391850
Share on other sites

Archived

This topic is now archived and is closed to further replies.

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