Author Topic: Simple Server Needed  (Read 14080 times)

0 Members and 2 Guests are viewing this topic.

SirCmpwn

  • Guest
Re: Simple Server Needed
« Reply #15 on: August 29, 2010, 10:11:33 pm »
*bump*

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 #16 on: August 30, 2010, 01:02:53 am »
Good luck on this Sir. I wish I could help :/

SirCmpwn

  • Guest
Re: Simple Server Needed
« Reply #17 on: August 30, 2010, 08:38:46 am »
Thanks.  My bump proved ineffectual, though.
The current state of things is that two people are coding it, and I have secured hosting.  \o/

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 #18 on: August 30, 2010, 02:02:40 pm »
Yeah I noticed :/

My guess is that people may not be experienced in that stuff very much over here. Some on IRC are, but they never check the forums and IRC is blocked for you.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Simple Server Needed
« Reply #19 on: August 30, 2010, 02:43:23 pm »
Out of curiosity, why do you want/need this?

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 #20 on: August 30, 2010, 04:00:28 pm »
To mess around :P

SirCmpwn

  • Guest
Re: Simple Server Needed
« Reply #21 on: August 30, 2010, 04:43:23 pm »
To get around filters.  That's the honest answer.

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Simple Server Needed
« Reply #22 on: December 01, 2010, 01:55:59 pm »
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($url); //GET
$contents http_post_data($url, Array("key" => "value")); //POST, sending $_POST["key"] = "value";

?>


That should work.
Edit: Using eregi & file_get_contents instead
« Last Edit: December 02, 2010, 01:25:51 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...

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 #23 on: December 01, 2010, 02:00:05 pm »
HOLY NECROPOST BATMAN! O.O

However, I wonder what that script does exactly? Does it just acts like a proxy and can it be used anywhere that supports PHP? I'm not experienced with that stuff.

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Simple Server Needed
« Reply #24 on: December 01, 2010, 02:02:51 pm »
Sorry about the necropost, but I felt the urge to help him :P
Anyway, this script gets the last (didn't check if it was already found) found variable in the $_GET that contains http://
It then stores the url in the $url var and below it does whatever Sir wants to do with it.
Url format should then be: http://www.mysite.com/?http://www.google.com/
Which then sends a GET request (or POST) to google.com

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 #25 on: December 01, 2010, 02:05:15 pm »
Cool. Now I wish 1and1 allowed proxies so I could load this on my other webspace. I doubt my current webspace allows proxies either. Maybe one day, if I ever get a dedicated server...

SirCmpwn

  • Guest
Re: Simple Server Needed
« Reply #26 on: December 01, 2010, 05:06:52 pm »
^_^ Thank you so much!  Now that we have the code, would someone be willing to offer hosting?  I can start working on the client side code.
EDIT: It got uploaded, but upon GETting http://www.davidgom.co.cc/free.php?http://www.google.com, it gave the following errors:

Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in /home/a6670055/public_html/free.php on line 9

Fatal error: Call to undefined function http_get() in /home/a6670055/public_html/free.php on line 16
« Last Edit: December 01, 2010, 05:47:32 pm by SirCmpwn »

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 #27 on: December 01, 2010, 11:41:24 pm »
Maybe http_get() is not supported on his server?

Also I would give hosting but I don't want to get my 1and1 account suspended for hosting proxies. I would need to check if my aspiration account allows it, but it would be pointless to do a proxy to access Omni there, since it would be the same IP. If parents blocked the entire IP instead of just the domain, the proxy would get blocked too...

Offline Ikkerens

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 378
  • Rating: +28/-9
  • JavaScript Magician
    • View Profile
    • Walotech
Re: Simple Server Needed
« Reply #28 on: December 02, 2010, 01:23:18 am »
Ok, seems your current server doesn't have some default PHP libs installed. (Safemode=true? Never know those blocked 'm)
Instead of preg_match, you can use eregi. The parameters stay the same.
And for http_get, you can use file_get_contents. Again, the parameters stay the same.
That should work ;)

Edit: Edited original code to an alternative
« Last Edit: December 02, 2010, 01:26:14 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...

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 #29 on: December 02, 2010, 04:04:46 am »
It appears to be a free hosting provider. Most free hosts got extremly limited PHP support, if they have PHP support at all. Even some paid hosts, most notoriously oversellers like 1and1, Surpasshosting, HostGator and DreamHost, will have some PHP functions disabled or even disable them without notice (which killed one of our anti-spam until we moved). In Omnimaga case, I think file_get_contents and fetch_web_data wouldn't work properly anymore.