I'm wondering if there's any way to do the following:
function whatever($parameter)
{
echo funky_reflection_function();
}
whatever(5 == 7); // outputs "5 == 5" (not true or 1)
I'm not optimistic, but anyone know if theres any crazy hack I can do to do this?
...
I want to store my database connection information in a single file, which both PHP and Ruby scripts can use.
Should I use name-value pairs, yaml, xml, or something else?
...
I am using PHP
to implement an HTML form and
for validation of the data submitted by the form.
There are two scripts. In order for the second script to know about values assigned by the first, I am using a POST method with the following code:
foreach (${"_".$_SERVER["REQUEST_METHOD"]} as $k => $v) $$k = $v;
to retrieve each of t...
When I'm writing scripts in PHP to work with MySQL databases with a MEMORY storage engine, is it as fast as PHP variables? Can I consider using such a database in place of some variables for buffers, message queues, etc?
...
i developed a login form that allows the use of openID. Works fine for most users, but this user has a .mp address. The openID connection keeps on failing.
i tracked down the .mp domain to the provider http://chi.mp (yeah, i know).
I use the simpleOpenId php class to perform the connexion. It returns no error, just dies silently.
An...
Hi All,
I am displaying a overlay on click of a row in the table. The over lay is a div
in the same page. This is working perfectly fine. But now my requirement is like if
i click on row 1 it should display the row 1 and if row 2 is clicked it should
display the row 2 and so on. But the problem is i can know the row clicked from t...
I only have two variables to work with here, age (unix timestamp) and hits. I'm wondering if there is a solution in MySQL to calculate and order by the popularity of something. The algorithm would have to acknowledge that new items would not necessarily have as many hits as older ones but are more popular.
Is this possible the way I'm i...
i'm using curl to retrieve a page which has a table structure as below.
...
<tr>
<td>
<table>table1</table>
<table>table2</table>
....................
<table>table25</table>
</td>
</tr>
....
i need the data in table table1 to table 25. How to parse it to ...
Hello, I'm creating pagging for some data.
For example, I have a page:
http://example.com/news.php?type=bla&smth=bla
There are I have a list of news with links to another pages. Link to the first page is:
http://example.com/news.php?type=bla&smth=bla&page=1
Here is script, which creates pages links:
print '<a href="?'.$_SERVE...
I was wondering how can I turn the echo part into a varialble (I think thats whats you call it) because I can post the "Please enter your last name!" any where on the web page.
// Check for a last name.
if (eregi ('^[[:alpha:]\.\' \-]{2,30}$', stripslashes(trim($_POST['last_name'])))) {
$ln = escape_data($_POST['last_name']);
} els...
Does anyone know of any API key generator script/class for PHP? The class should have method generate, that would generate a key and isValid() method, to check if the key is valid.
Thanks!
...
I'm getting a fatal "Call to a member function on a non-object" error in a PHP script, but I'm unable to track down exactly where this is happening, or why. The error message is pretty-much useless, as the line it describes works 99.9% of the time.
Is there a way I can get the current call stack, trace what calls are being made before t...
Now I'm trying to test a registration form on my computer I have PHP & Mysql and wampserver installed on my windows vista computer but when I try submiting the registration form I get the following error.
Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
I ...
Hello,
I am planning to launch a free webmail service at mail(dot)com(dot)es where users can signup and have their free webmail account (for example like www.email.gr). I am looking for a free or low cost webmail system script to install on my website. Do you know any free or low cost scripts which would be suitable for this?
Thanks
...
Wich one should I use to index a user from a Openid auth proccess. "openid_identity" or "openid_claimed_id"? Im using Dope OpenId class and data returned is :
[openid_ns] => http://specs.openid.net/auth/2.0
[openid_mode] => id_res
[openid_return_to] => http://localhost/login/authenticate
[openid_claimed_id] => https://me.yahoo.com/a/wK7...
I am developing a Facebook app in Zend Framework. In startAction() I am getting the following error:
The URL http://apps.facebook.com/rails%5Facross%5Feurope/turn/move-trains-auto is not valid.
I have included the code for startAction() below. I have also included the code for moveTrainsAutoAction (these are all TurnController actions)...
Hi there,
I want to check via php if someone connects to my site via IPv4 or IPv6.
The client address can be found in $_SERVER["REMOTE_ADDR"] but how to check if it's IPv4 or IPv6 ?
Thank you for your time
Andre
...
How do I install mcrypt? I'm using Leopard 10.5.8 with PHP5.
...
If I execute an insert query with a stored procedure with php and the mysqli_* functions, is there a way to retrieve the value of an autoincrement id field?
mysqli->insert_id does not seem to work.
...
Hello all,
I'm trying to run a simple getJSON to a PHP file using:
$.getJSON("loadThumbs.php", { usrID: 25 }, function(data){
alert(data.filename);
});
And when the alert messages pops up it reads "undefined."
Here's my PHP file (loadThumbs.php):
$usrID = $_GET['usrID'];
$sql = "SELECT id, isDefaultProfile, filename, usrID FR...