PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<html>
<?php
$daurl = $_GET['url'];
echo '<head><base href='.$daurl.'></head><Body>';
// Set your return content type
//header(Content-type: application/xml);
// Website url to open
// Get that website is content
$handle = fopen($daurl, "r");
// If there is something, read and return
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose($handle);
}
?>
</body>
</html>
Thanks
Last edited by nazg on Thu Apr 29, 2010 10:56 am, edited 1 time in total.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
<?php
//$daurl = $_GET['url'];
$daurl = 'http://www.newegg.com/Store/Computer.aspx?name=Computer-Hardware';
// echo '<head><base href='.$daurl.'></head><Body>';
// Set your return content type
//header(Content-type: application/xml);
// Website url to open
// Get that website is content
$handle = fopen($daurl, "r");
// If there is something, read and return
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose($handle);
}
?>
<?php
//$daurl = $_GET['url'];
$daurl = 'http://www.newegg.com/Store/Computer.aspx?name=Computer-Hardware';
// echo '<head><base href='.$daurl.'></head><Body>';
// Set your return content type
//header(Content-type: application/xml);
// Website url to open
// Get that website is content
$handle = fopen($daurl, "r");
// If there is something, read and return
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
echo $buffer;
}
fclose($handle);
}
?>
That's because you're not trying to pass it in using $_GET like the OP, so of course it works.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
To AbraCadaver:
Thanks for responding. However, the links themselves are in a .html file. I guess I could a .php file and do what you suggested. Could you think of anyway to fix the following:
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Excellent thanks to AbraCadaver I found the solution. I simply went to http://www.albionresearch.com/misc/urlencode.php and encoded my url (which I put in my html link). The funny thing is that I did not decode the url in the php proxy and it somehow worked?! Thank to all for responding.
Oh, and one more thing, the javascript escape solution works as well.
nazg wrote:Excellent thanks to AbraCadaver I found the solution. I simply went to http://www.albionresearch.com/misc/urlencode.php and encoded my url (which I put in my html link). The funny thing is that I did not decode the url in the php proxy and it somehow worked?! Thank to all for responding.
Oh, and one more thing, the javascript escape solution works as well.
Yeah, I forgot that $_GET variables are automatically decoded.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.