Tag Archive for php

Sending multipart POST requests with PHP

php-logo

A long time ago I wrote about the same thing, but with more text and a C++ example, you can find it here. This time I made the same thing but in PHP and using cURL, because it was for a project I was working on. Basically I had a very simple task that needed to be a bit automated. Whole website is also basic, just simple authentication and then a simple file upload. In this project generate a lot of data (around 5mb) and then POST all of that to the file upload script.
Read more

Querying LDAP with PHP

ldap-logo

Greetings. So today I’m gonna write about stuff. Managing basic LDAP things with PHP, to be precise… Had a problem at work, that sometimes we do not receive information about new people when they get accepted. Because we don’t receive any information, we don’t always know what to import/create. Then those people come to us asking why they can’t log into computers and use Wifi, then we have to look them up in a outside Oracle DB and create a user like that. That’s a silly, repetitive and a daunting task. Some kinda tool to automate this had to be created so it could be integrated into our existing IT system as well.
I’m not gonna write about the tool, instead I’ll be writing about problems that came up adding users, creating groups and modifying attributes.
Read more

Voteban IRC bot in PHP

php-logo

Oh hello, I present to you my latest project in PHP – a Voteban bot. This project is probably my last in a very long time as I have became VERY busy lately and have no time for new projects…
So I will not write a lot here, instead I’ll c/p the README I made yesterday, it explains errythang.
You can download the whole project from here: https://github.com/kulverstukas1/votebanbot
And the bot is live on Evilzone’s IRC server, I am hosting it on my RaspPI for now.

I am open to suggestions and already have a TODO list which I am hoping to complete one day…
Read more

Vardo linksniavimas su PHP

php-logo

Teko pasirašyti kelias funkcijas kad linksniuotų vardą ir pavardę pagal tris linksnius, kad kreipimasis sistemoje atrodytų natūralesnis. Žemiau pateikti 3 kodų blokai veikia tik su Lietuviškais vardais ir pavardėmis, kiek teko bandyti tai keičia tinkamai visada jeigu vardas ir pavardė yra sąmoningi :P – jeigu kokią klaidą pastebėtumėte, prašau pranešti komentaruose :)
Nesiu aš kietas PHP programeris tai ir kodas gal bus kiek lievokas, tačiau atitinka mano lūkesčius ir veikia. Good enough :D
Read more