Tag Archives: text

How to output MD5 hashed password in plain text?

Questions: I have passwords for members on a site encrypted using MD5 and stored in the database. I want to implement a lost password functionality where the user will be emailed their credentials if they forget them. But how to output the unencrypted password or is it one way encryption and hence impossible? Answers:

Php SoapClient stream_context option

Questions: I want to use a third party’s web service. To use the web service I need to connect with HTTPS. My problem is that for the development process I have a test api with an invalid certificate. I would like to set SoapClient no to verify the server’s certificate. Here is the way I… Read More »

Auto fill text box depending on Drop Down value

Questions: This might be a stupid question but I would like to have a clarification on how to go about this.I have come across quite a few articles that let to set the values of a text box depending on the choices made in a drop down menu using jQuery and Ajax.My issue is when… Read More »

PHP Zip 3 small text files and force download

Questions: My website writes 3 small text files based on users information and then presents these 3 files as links that they must “right click” and save to their desktop. I would like to keep that, but also somehow offer a way to zip these 3 small files up and force download. And I don’t… Read More »

php domdocument read element inner text

Questions: I’m new to php so please forgive the simple question: How do I extract the text from an element? <span id=”myElement”>Some text I want to read</span> I have this for a start: <?php $data = $dom->getElementById(“myElement”); $html = $dom->saveHTML($data); But then? What is the correct instruction? Answers:

content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'

Questions: I’ve been trying for a long time to send right request to soap server. I’m keep getting error message. Here is my xml GET LAST REQUEST (newlines added): <?xml version=”1.0″ encoding=”UTF-8″?> <SOAP-ENV:Envelope xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:ns1=”http://tempuri.org/”> <SOAP-ENV:Body><ns1:TestData1><ns1:iVal>1</ns1:iVal></ns1:TestData1></SOAP-ENV:Body> </SOAP-ENV:Envelope> GET LAST RESPONSE : REQUEST HEADERS: POST /DPWebService/CardsService.svc/ICardsService HTTP/1.1 Host: d67v7tg1 Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.9-1 Content-Type: text/xml; charset=utf-8… Read More »

Working with GD ( imagettftext() ) and UTF-8 characters

Questions: Just for the record – my first question here but hopefully not my last input in the community. But that’s not why I’m here. I’m currently developing a simple system that has to generate an image with a text on it. Everthing went well until I realised that GD cannot handle UTF-8 characters like… Read More »

merge all files in directory to one text file

Questions: In PHP, how can I open everyfile, all text files, in a directory and merge them all into one text file. I don’t know how to open all files in a directory, but I would use the file() command to open the next file and then a foreach to append each line to an… Read More »