Author Topic: Simple Server Needed  (Read 14089 times)

0 Members and 1 Guest are viewing this topic.

SirCmpwn

  • Guest
Re: Simple Server Needed
« Reply #30 on: December 07, 2010, 05:12:59 pm »
*bump*
The errors were never resolved.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Simple Server Needed
« Reply #31 on: December 07, 2010, 05:13:59 pm »
Well, is my server working well? I don't think so:

www.davidgom.co.cc/free.php

SirCmpwn

  • Guest
Re: Simple Server Needed
« Reply #32 on: December 07, 2010, 05:15:38 pm »
No, I don't think you have the updated code:
Code: [Select]
<?php

$url 
"";

//Try to fetch the url
foreach ( $_GET as $key => $value )
{
//I know this method isn&#39;t entirely secure, but it gets the job done ;)
if ( eregi("http://"$key) )
{
$url $key;
}
}

//Do what you want with the url?
$contents file_get_contents($url); //GET
$contents http_post_data($url, Array("key" => "value")); //POST, sending $_POST["key"] = "value";

?>

New errors:
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/a6670055/public_html/free.php on line 16

PHP Error Message

Warning: file_get_contents(http://www_google_com) [function.file-get-contents]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/a6670055/public_html/free.php on line 16

PHP Error Message

Fatal error: Call to undefined function http_post_data() in /home/a6670055/public_html/free.php on line 17
« Last Edit: December 07, 2010, 05:25:29 pm by SirCmpwn »

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Simple Server Needed
« Reply #33 on: December 07, 2010, 06:16:32 pm »
No, I don't think you have the updated code:
Code: [Select]
<?php

$url 
"";

//Try to fetch the url
foreach ( $_GET as $key => $value )
{
//I know this method isn&#39;t entirely secure, but it gets the job done ;)
if ( eregi("http://"$key) )
{
$url $key;
}
}

//Do what you want with the url?
$contents file_get_contents($url); //GET
$contents http_post_data($url, Array("key" => "value")); //POST, sending $_POST["key"] = "value";

?>

New errors:
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/a6670055/public_html/free.php on line 16

PHP Error Message

Warning: file_get_contents(http://www_google_com) [function.file-get-contents]: failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/a6670055/public_html/free.php on line 16

PHP Error Message

Fatal error: Call to undefined function http_post_data() in /home/a6670055/public_html/free.php on line 17

In my website I'm getting all types of errors :(

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Simple Server Needed
« Reply #34 on: December 08, 2010, 01:26:07 am »
Quote
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/a6670055/public_html/free.php on line 16
Never got this one before, any chance you have safe mode activated for some reason?
If not, there's something wrong with your server (heavily outdated?)

http_post_data.. dunno what's happening there...
Edit: Doesn't seem to work on my server, either, edited the code a bit since it seems to have the urge to replace the dots with _'s
Fixed:
Code: (php) [Select]
<?php

$url 
"";

//Try to fetch the url
foreach ( $_GET as $key => $value )
{
//I know this method isn&#39;t entirely secure, but it gets the job done ;)
if ( eregi("http://"$key) )
{
$url $key;
}
}

//Do what you want with the url?
$contents file_get_contents(str_replace(&#39;_&#39;, &#39;.&#39;, $url)); //GET
echo $contents;

?>

« Last Edit: December 08, 2010, 01:26:41 am by Ikkerens »

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

SirCmpwn

  • Guest
Re: Simple Server Needed
« Reply #35 on: December 08, 2010, 02:24:43 am »
Do we know if this works?

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Simple Server Needed
« Reply #36 on: December 08, 2010, 03:05:02 am »
Idk, but if there are file get content server errors, this means this needs to be hosted on a different host.

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Simple Server Needed
« Reply #37 on: December 08, 2010, 03:30:47 am »
That last code works on my own server, which runs on PHP 4.3.0
Unless your host as safemode enabled, which blocks external connections.
Consider looking for another host? (I believe www.freehostia.com works fine)

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Simple Server Needed
« Reply #38 on: December 08, 2010, 03:33:34 am »
Don't try 1and1, that's for sure. For odd reasons, file_get_contents worked with OmnomIRC but not for some other stuff. It actually used to work perfectly but then 1and1 restricted it, killing Omnimaga forum's anti-spam.

You could always ask your OS, though. Also keep in mind Freehostia is slow sometimes, so you might not be able to access your site from time to time.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Simple Server Needed
« Reply #39 on: December 08, 2010, 11:58:34 am »
That last code works on my own server, which runs on PHP 4.3.0
Unless your host as safemode enabled, which blocks external connections.
Consider looking for another host? (I believe www.freehostia.com works fine)

I am using 000webhost with PHP allowed (I have PHP stuff in my website), maybe an outdated version. Need to check that

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Simple Server Needed
« Reply #40 on: December 08, 2010, 01:49:28 pm »
Or you could try out the code using localhost ( http://www.uwamp.com/ or http://www.wampserver.com/ are the most popular )

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Simple Server Needed
« Reply #41 on: December 08, 2010, 03:57:42 pm »
What if a website is blocked at his home, though? (Example, Omnimaga) Would running this code as localhost still bypass this?

SirCmpwn

  • Guest
Re: Simple Server Needed
« Reply #42 on: December 08, 2010, 05:08:20 pm »
I will eventually release the protocol for this in the hope that as many people as possible will host it.
Also, I have uploaded the file to http://fnproxy.sourceforge.net/, but it still doesn't work.  Any ideas?
« Last Edit: December 08, 2010, 05:20:02 pm by SirCmpwn »

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Simple Server Needed
« Reply #43 on: December 09, 2010, 02:29:46 am »
Sir, I'd like you to check your PM Inbox.
Sent you a message.
« Last Edit: December 09, 2010, 08:10:10 am by Ikkerens »

Splut for Android [----------]
Paused/halted indefinitely, might be abandoned, our graphic designer quit and the rest of us simply doesn't have the time to work on it...

SirCmpwn

  • Guest
Re: Simple Server Needed
« Reply #44 on: December 09, 2010, 07:18:16 pm »
Checked :)
Thanks.