20000 forum users - Awesome Special Event!

But spamming is killing… the joyful mood of the forum and the time of moderators :stuck_out_tongue:

7 Likes

Are there any PHP devs here?
I keep getting this error even when I type a proper number.
image

5 Likes

i think u have to typecast to an int…

8 Likes

You can use is_numeric() instead, as $_POST will give strings anyway. Here is the documentation for it:

https://www.php.net/manual/en/function.is-numeric.php

7 Likes

Numeric also accepts floats which are invalid port values, however, so I also believe typecasting would be a better solution. You can also use Simon Neaves’ isInteger function mentioned in the article for is_int:

function isInteger($input){
    return(ctype_digit(strval($input)));
}
Not recommended alternatives and explanation

Since you’re expecting strings however you don’t even need strval, so you could also directly call ctype_digit:
PHP: ctype_digit - Manual

Keep in mind that if you directly use ctype_digit, it will only work on strings, so it will return false if you pass an actual integer (that isn’t in string format) to it. This behavior will be changed in later PHP versions; but it’s better to ensure what you pass is passed as a string, so I’d recommend keeping the function as is.

EDIT:
I was just looking in the documentation for how ctype_digit behaves and noticed that Simon provides an example where var_dump(ctype_digit("23")) strangely returns false, whilst when calling his function on it true is correctly returned. I’m not sure if this was a strange error that was later corrected or if it still occurs, so I wouldn’t recommend using the function without calling stringval on it.

This was supposed to be a 5-minute update but instead took me 3 hours to post because I forgot about it. :joy:

8 Likes

I see. Didn’t realise POST data are returned as strings.

5 Likes
echo gettype($variable);

Easier than before.

7 Likes

Make sure that the entered number does not exceed the value of 65535 (unsigned 16-bit integer)
because then it’s not a valid port # even if it’s an int.



9 Likes

I just noticed two new domains for free subdomains have been added - wuaze.com and kesug.com!
It might be early to tell, but personally, I can definitely see wuaze becoming epizy’s successor.

I assume they were added as a result of the recent epizy discussion:

Unless I’m wrong and they were planned to be introduced anyways, or were introduced previously and I just took notice?

8 Likes

@Thewebuser22

2 Likes

@wackyblackie

In 2019, I successfully used Railgun on the CF free service while also using InfinityFree.
The admin was surprised that this function was available to me and it was not enabled for him on CF PRO :slight_smile:

But I kept RG turned off because it always put ?i=1 in my URL (while my website is via CF) which irritated me.
And my website is 90% static code so it doesn’t make any sense to keep it on for 10% PHP code.

Even then ifastnet was not listed as an optimized partner.


Here is a screenshot from one of my PMs
not every listed RG server worked, but with a little experimentation you could find one that worked


7 Likes

That was the best thing someone could ever have… On free hosting as well! But anyway it was in the past; now they removed it all and seems like only Premium Hosting still has it… At least for until the end of this year.

5 Likes

According to Admin’s post, not even they have it anymore:

I can confirm the Cloudflare plugin does not exist anymore on the iFastNet cPanel Demo, so by extension Railgun is probably disabled, too.

New accounts can’t get it anyway:

7 Likes

Oh, that’s sad… So now Railgun is not available anymore… But anyway servers nowadays are so fast that it isn’t even needed!

3 Likes

I didn’t see iFN on their list (via wayback archive), but Byet Internet was on there (which is ofc the iFastNet one).

6 Likes

Probably one of the Byet admins made it possible and thus remained unnoticed in the system for years in the sense that it was also enabled for the free hosting service and I could use RG although I’m not Premium.

7 Likes

Now I’m going to sleep… I still hope there will be more servers with PHP 8.1 on free hosting, because some (and the other three that might come with the maintenance they’re doing) aren’t enough and keeping PHP 7.4 isn’t recommendable for safety and for less compatibility with most software as of now…

7 Likes

Those two are actually really good! Good job on infinityfree for adding them

4 Likes

I redesigned https://ai.generateapps.org/index

4 Likes

Looks good

3 Likes