Hi,
i want to monitor how often some external images are loaded.
So what my idea was instead of giving a uri directly like this:
www.site.com/image1.jpg
i create a php script which reads the image, so i build a php file and my html would look like this:
<img src="www.site.com/serveImage.php?img=image1.jpg">
but i don't know how to...
What does the main argument of the following statement explicitly mean?
The manual says Doxygen supports only partially PHP. I would like to know what this means explicitly, since I could not find an answer to it in the homepage.
...
I am using the following code to invalidate the session. I have linked to logout.php in many pages. If that logout link is clicked the logout.php page is called. The following is the code in logout.php.
unset($_SESSION['admin']);
session_destroy();
header('Location: index.php');
Once the session is invalidated I want to open the page...
Hi there.
I am creating a new PHP framework depending on Zend Framework.
It will be a general purpose MVC framework for web development.
I am worried about 2 aspects:
Logging:
Should I use logging? Is there any substantial performance problems when using logging?
Caching database queries:
I am caching some queries from database.
I am c...
Hello,
in my website i've a PHP script that automatically mails to my customers a confirmation about the order.
My website's domain is registered to a company that hosts my website too.
I have a lot of problems to send e-mails using mail() function to some e-mails accounts ... a lot of my users contact me saying that they have never rec...
I'm wondering if multiple entries on htaccess will work for 301 redirects.
The problem I see is that old site files have 'html' extension and are named named differently so a simple global redirect won't work, it has to be one rule per file name.
This sites receives 1000 visits daily so need to be careful not to penalize search engine....
Hello all,
I'm starting to work on a small script that takes a string, counts the number of characters, then, based on the number of characters, splits/breaks the string apart and sends/emails 110 characters at a time.
What would be the proper logic/PHP to use to:
1) Count the number of characters in the string
2) Preface each messag...
Let's start this off with a short code snippet I will use to demonstrate my opinion:
$title = new Zend_Form_Element_Text('title', array(
'label' => 'Title',
'required' => false,
'filters' => array(
'StringTrim',
'HtmlEntities'
),
'validators' => array(
array('StringLength', false, array(3, 100...
Hi, I was wondering how to basically edit a .swf file using php, to change a single variable or to change more. How would I go about doing this? Is there a way to edit it without knowing machine code?
If there is an example of how to do this, where can I find it?
Thanks!
Or, if there is an easier way to go about doing this, please let...
I am sure i created a php file into a folder named web in htdocs folder. But while directory browsing it shows only html, css files inside that folder. But the php files are not shown. Help me
...
I have an array of employee ids:
34 , 35, 40, 67, 54 and so on.
What would be the simplest way to query my 'employees' table and find all the names of the correlated employees?
That is a query that would return the 'name' for each of the ids in the array.
...
Hi peeps,
Im fairly new to php, and im trying to load an xml source from a remote location, so i have no control of the formatting. Unfortanely the xml file im trying to load has no encoding:
<ROOT xmlns:sql="urn:schemas-microsoft-com:xml-sql"> <NODE> </NODE> </ROOT>
When trying something like:
$doc = new DOMDocument( );
$doc->load(...
i had no problem at all running the following code on a local server, but when i run it from phpmyadmin on a yahoo hosting webserver, i am getting this error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALGORITHM=UNDEFINED DEFINER=root@loca...
Hi guys,
I want to make a login system using cookies/sessions but I'm not sure what security and such is like with them.
With sessions, if "login" is set to "yes", can I trust that? Are users able to change what it returns? Should I just store the encrypted password and check it on every page?
With cookies, would I have to check for ...
Hi all,
I'm currently developing a script that takes a message, splits it apart every 100 characters or so, and sends each part.
However, my original string has "\n" lines in it, and this is causing an issue with my preg_split, causing it to split pre-maturely (e.g., before 100 characters).
Here's what I am currently working with:
...
Is this a common task in your Drupal work when you're asked to create a custom admin section in Drupal for your content?
For instance, you have a few content types and user wants not only to view them, but to search using different filters, to add new items - all inside the same admin subsection.
In essense, this is classic search/gri...
I'm new to Drupal dev, and was trying to add an existing region variable to my module's preprocessor function.
Basically, I've created a new region for my site (here's the definition from within side my theme's .info file):
regions[feeds] = Feeds
From Administer->Blocks, I've added the blocks I want to the new "Feeds" region.
Then, ...
I would like to pass a long string to a second page.
Normally I pass short strings as variables
www.example.php?var=something&var2=somethingelse
In this case tho I would like to pass a long sentence to a second page and not have to replace all the white spaces with dashes deal with commas and apostrophes.
Is there a simple way to d...
Hello Code Wizards,
I am a total NOOB in programming (but this is only my second question on stackoverflow :-) ).
By a foreach function I get 5 different string values for $Loncoord, $Latcoord, $gui;
this I can see with the print_r in the code written below:
"-5.68166666667","+24.6513888889","IMG_3308",
But I now want to create 5 di...
I have arrays, some are multidimensional as well. I need a way to know if all the values are NULL. What would be the most efficient and effective way of determining if ALL values of an array (as well as the values of the arrays within that array) are NULL?
So basically: search array, if all values are NULL, $flag = true
EDIT: The value...