Jump to content

help...


phpSensei

Recommended Posts

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