I am trying to create an outlook distribution list with php but I am having a hard time finding any resources or instructions on how to do so. Is it even possible to do this?
I want to write php codes independent from template xhtml. (fonctions widthout any xhtml code inside )
Is there any good resource for studying?
Thanks in advance
Hi,
In ASP.NET if I declare a variable (or object) static (or if I make a singleton) I can have it persist across multiple sessions of multiple users (it it registered in a server scope) so that I don't have to initialize it at every request.
Is there such a feature in PHP? Thanks
Hai
I have one more doubt in apache mod_rewrite.
I want to rewrite the url
mydomain/index.php?category=1&id=1
To
mydomain/index/category/1/id/1
How I write rule in .htaccess
And what is the link that i have to give inside the a tag
Please give me a solution..
I recently upgraded to PHP 5.3 and since then I get (sporadic) error messages which indicate Apache (or may be the cleaner of the session files) has no permissions to the folder where the sessions are stored.
This happens randomly and can't be reproduced with exact steps, which led me to guess it is the session cleaner.
Any one has experience with such errors?
So I was reading about PHP namespaces, and I realized that in versions earlier than 5.3, if you write
namespace MyNamespace
you get a parse error.
Is there any way to avoid this i.e. make namespaces backwards-compatible, so the code doesn't simply crash?
I'd like to learn PHP specifically for dealing with security vulnerabilities/exploits.
Could someone recommend a book?
I don't know if I need to learn HTML/CSS/XML/XHTML etc, do I have to learn those too? I don't really plan on designing websites, could anyone help me with this? :P
I have a website in which I have a several php forms that I would like to fill out with auto generated content (for the purposes of exercising different content the user could submit). I would like to write a client side application that enables me to do so.
Is there any way either using webtoolkit, java script etc of doing this?
Thank all for your help,
PHPNoob
Hi!
Is there any lightweight validation library available for PHP that easily can check if a specific string or value is valid for a known database type -
Something like this:
if (is_MEDIUMINT($var)) {
$this->db->insert($anothervar);
}
Thanks!
Is it possible to merge these two mysql queries into one? I want to get NOW() returned to a php variable.
mysql_query('INSERT INTO translate (IDRef, RefType, Lang, Text, LastChangeTS) VALUES ('.$id.', \''.$reftype.'\', \''.$lang.'\', \''.$text.'\', NOW()) ON DUPLICATE KEY UPDATE text = \''.$text.'\', LastChangeTS = NOW()');
mysql_query('SELECT LastChangeTS FROM translate WHERE IDRef = '.$id.' AND RefType = \''.$reftype.'\' AND Lang = \''.$lang.'\'');
I was wondering if the code below is the correct way to use mysqli_real_escape_string() when storing users data in a database.
Here is the PHP & MySQL code.
if (mysqli_num_rows($dbc) == 0) {
$mysqli = mysqli_connect("localhost", "root", "", "sitename");
$dbc = mysqli_query($mysqli,"INSERT INTO info (user_id, url)
VALUES ('$user_id', 'mysqli_real_escape_string($url)')");
}
if ($dbc == TRUE) {
$dbc = mysqli_query($mysqli,"UPDATE info
SET url = 'mysqli_real_escape_string($url)'
WHERE user_id = '$user_id'");
Hi
I'm using the following simple PHP proxy script but am getting a sporadic message at the destination site.
I'm thinking that perhaps it may have something to do with the HTTP_REFERER header, although I'm not explicitly defining it.
Can anyone tell me how to explicitly turn off or leave the HTTP_REFERER header blank?
Thanks in advance!
$url = $_GET['path'];
readfile($path);
Hi!
I think most of us know about the infamous "Headers already sent" error in PHP. Can I check someway if headers already have been sent?
It would be really handy to do such, before going all out with trying to set some SESSION data or similar.
Thanks!
Hi,
Being quite new with PHP, I cannot find any solution why this does not work. The query is OK and the resource is returned. But I dunno why fetch_assoc does not print values. Thanks
$query=sprintf("SELECT ID,NAME FROM USERS WHERE PASS='%s' AND NAME='%s'",mysql_real_escape_string($p),mysql_real_escape_string($n));
$result=mysql_query($query);
if ($result)
{
while ($row = mysql_fetch_assoc($result)) {
echo $row['ID'];
echo $row['NAME'];
}
}
}
I'm trying to parse the dmoz content/structures xml files into mysql, but all existing scripts to do this are very old and don't work well. How can I go about opening a large (+1GB) xml file in php for parsing?
I want to calculate the number of Tweets of a Twitter Search, and a countup. Just like GigaTweet. How can I calculate this using PHP and the Twitter API?
I need to run a background PHP script on the server, but it clogs the pipe and chokes and server. How do I limit its resources and allow other tasks to run smoothly along with it.
Will incorporating usleep into the script help?
In my .htaccess file I need to turn on the following:
php_flag display_errors On
php_value error_reporting 2147483647
However I only want to do this if my IP is visiting the site.
Any ideas?
Something like...
if (ip == "x.x.x.x") {
php_flag display_errors On
php_value error_reporting 2147483647
}
Need to do this in .htaccess NOT in the PHP thanks!
i need a solution for array_replace_recursive, because my php-version isnt high enough.
i wat to use this code
$_GET = array_replace_recursive($_GET, array("amp"="&"));
easy, isnt it?
Glubber