XML signature validation against remote certificate, with PHP
I'm working on a project where I need to validate an embedded signature in an XML file (SAML assertion) against a public key located on a remove server. Has anyone done this in PHP? ...
I'm working on a project where I need to validate an embedded signature in an XML file (SAML assertion) against a public key located on a remove server. Has anyone done this in PHP? ...
I am finding that in PHP if I do this: class Foo{ /** * Does something cool * @return * Always returns 1 */ public function bar() { return 1; } } doxygen will not document the member function 'bar' If I take out the 'public' keyword, it does. Is there some setting that controls this? I've l...
I have this code that makes sure your are logged in, and then making sure you are on the right page by checking a cookie set at login. This code works on a page in a directory underneath the login in script, however in a page in a directory below that it always takes you to accessdenied. Any ideas? <?php session_start(); if(!isset($_...
Let's say I'm connecting to an FTP by sending an ajax request to PHP: $connection = ftp_connect($server); $login = ftp_login($connection, $ftp_user_name, $ftp_user_pass); After this request I want to upload a file: $upload = ftp_put($connection, $dest, $source, $mode); Is there a way to keep an FTP connection to the server on the c...
Why does PHP require you to explicitly write $this? I would understand if you had to use $this here: function foo($bar) { $this->bar = $bar; } But you must write it explicitly in verbose code that looks like this: $this->var3 = globalFun($this->var, $this->var2[$this->anotherVar], $this->method()); as opposed to: $var3 = globaF...
I'm trying to connect to an FTPS server (not SFTP). I am connecting from a linux system, so I have tried lftp, ftp-ssl, and even using php's ftp_ssl_connect, but none of them work. (I have been able to connect to other FTPS servers using all or at least some of the above methods). The most descriptive error I have is from lftp with ...
I was commenting on this question, and was wondering what would be the best to find similar words to build an index of word suggestion in case of a misspelled word, but all this regardless of the current locale (perhaps using a dictionary to find the word language, then use the proper method to find the metaphone, soundex, etc. value?) ...
Hi, How to put php inside javascript? I try (but its not working): <?php $htmlString= 'testing'; ?> <html> <body> <script type="text/javascript"> var htmlString=<?php echo $htmlString; ?>; alert(htmlString); </script> </body> </html> tutorial that I use for that parpose: http://web-design.lovetoknow.com/...
i make different queries with php and jquery and get the results with .ajax() when all queries return their values. what i want to do is to get those values as soon as they are ready. now user has to wait until all the queries are done, but the first query returns its value 30 seconds before the second one, so i dont want the user to wai...
Consider the following script that contains obfuscated email addresses, and a function that attempts to replace them based with ***** by using regex pattern matching. My script attempts to catch the words: "at", "a t", "a.t", "@" followed by some text (any domain name), followed by "dot" "." "d.o.t", followed by a TLD. Input: $str[] = ...
Hello, Could you any practical example showing how to make use zval containers? The only related function I know is debug_zval_dump, but I never really used it. Edit: I suppose, tracking zval containers I could see how to optimize the code, see how the memory is used by references. It seems it could be useful tool in some cases. There...
Hey guys, I am trying to create a chained list here. I want the user to choose something on the first 4 drop down list and once the last one is chosen, another one is supposed to pop up. I am just testing my code right now and for some reason the my codes are not showing the dropdown list that is supposed to be shown when the last inpu...
hi, I'm having an issue with sending an order e-mail from Drupal (Ubercart). I actually don't think the issue is in Drupal, because the e-mail is sent correctly to my e-mail address, but it doesn't arrive to the company e-mail address. What I've done so far to understand what's th issue: I received an e-mail from Drupal on my addres...
My function breaks at the line where I make an Active Record call, so I must not be calling things right. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Class Stuff { public function specific($passedArray) { echo "Test"; $CI =& get_instance(); $CI->load->database(); ...
I'm aware of ternary operator, more or less. But I'm unable to read this line. $length = null === $length ? strlen($data) : (int)$length ; What does $length = null === $length means? Thanks a lot, MEM ...
I have a file that goes thru a large data set and splits out the rows in a paginated manner. The dataset contains about 210k rows, which isn't even that much, it will grow to 3Mil+ in a few weeks, but its already slow. I have a first query that gets the total number of items in the DB for a particular WHERE clause combination, the most ...
I'm trying to plot data from several entities over time. Each entity will have its own line, so there will be several lines. Each line will be connected, but it's important that dots are drawn to represent data. I'm aware of the linked bar chart, but at initial inspection, I can't seem to find one that offers me the ability to draw ...
So I am trying to add a "-none" to a class for a post if it is in a specific category in Wordpress. So like lets say if I am viewing a post that has a category id of 7, i want a certain class titled "example" change to "example-none". Here's my code: <div class="example<?= is_category('events') ?'-none':'' ?><?= in_category('7') ?'...
Hi, I need to use PHP's SoapClient with myfile-ca.crt. How can I tell SoapClient constructor to work with client certificate (crt file) ? I am experienced with php SoapClient, but I never needed to work with secure soap client. Thanks for any help ...
Hi, I'm trying to accomplish a fairly simple task for my website, but I"m not sure exactly how to go about it. I want the user to be viewing a table, then click a button, at which point the user can save the contents of that table as a csv file. This request can sometimes be quite complicated so I generate a progress page to alert the us...