Skip to content

Secure image upload in php

I am making an image upload function which I can re-use in my code, which has to be 100% secure. Please tell me if you can spot and security holes in my initial code; UPDATE This is how far I’ve gotten with your help and some research, please tell me what you think. I don’t mind much about the spe…

How to round up value in PHP?

I have a value like this: $value = 2.3333333333; and I want to round up this value into like this: $value = 2.35; I already tried round, ceil and etc but the result is not what I expected. Please …

PHP Check if variable is contained in an array

I have a numeric variable $i. This is a while loop, and $i increments after each iteration. How can a conditional statement be made as to not be necessary to write such a long statement if($i == 1 || $i == 2 || $i == 25 […])? Thanks in advance! Answer Use php in_array.

jQuery not working when I echo it from PHP

I need only some js to run during some parts of a php script, for testing purposes I commented out the php so I am not going to show it here. The line I have labeled 1B works fine, the background image displays. The section labeled not working seems to have no effect but when I run it separately in

PHP cURL returns FALSE on HTTPS

I’m trying to make a bot for: https://coinroll.it/api From the site: The Coinroll API is a stateless interface which works over HTTPS. Requests are made using POST variables (application/x-www-form-…

Web Based RDP Client

Can I permit RDP based connections from a website using PHP/JS/etc? I’ve read that RDP session files can be placed on the web server but would prefer to implement it via code. I am looking for the …