I run a local blog, and I would like to offer advertisers the ability to buy ads knowing all of the impressions will be from the local community. For everyone else I want it to show typical google ads.
My questions are:
How feasible is this?
Is there any readily available code or service that can do something like this?
The cheaper t...
Hey guys and girls
I need your opinions and knowledge on a subject.
I'm developing on a website that uses a good amount of JavaScript. In a script tag at the end of the body tag I call a PHP file, which gathers all my JS files and combines/compresses them into one (shorter) file, so I can reduce the number of HTTP calls to the server.
...
Is it possible to share a session between my PHP app on a subdomain and my Ruby apps on my other subdomains?
I don't really know where to take it from here. I know I can manually set the domain to the root one so that the cookie is valid for all the subdomains, but how would I get/set stuff from/to the session so that it's shared across...
I know how to embed an image into an email as an attachment, but that's not really what I want to do. What I want to do is embed an image into the message and use that within the body of the email message itself. Is it possible to do this or possibly reference an attached file somehow to be used in the message?
Should I even worry about...
Possible Duplicates:
What is the best IDE for PHP ?
best IDE / Editor for PHP
I have been a .NET developer for years but may need to work on a PHP project soon. What editor/IDE should I use?
Thanks,
Paul
...
For the current app I am writing I have elected to place all database functionality into a single class, as it allows me to keep the database code away from the business logic and easily replace the database code if we ever have need to switch to another DBMS. However, recently my database class has become rather large (EDIT for info: a...
This is a question from PHP zend exam,
Using flock() to lock a stream is only assured to work under what circumstances?
When running in a Linux environment local filesystem
When accessing the stream of the local filesystem
When running in a Windows environment and accessing a share
When accessing a bi-directional stream
When accessing...
Hi
How can I put my JS and CSS files outside the public folder? I have a library that I'd like all my websites to use and for easy updating, have this outside a particular website public folder so it can be easily read by all. Is this possible or do I need to host it all on another domain (I'd rather not for ease).
htaccess possibly?
...
I'm having issues with an automatic parser which reads files that have been uploaded via FTP onto one of our hosts.
Basically it returns with the following error
Warning: rename(/home/domain.com/thefile.zip,/home/domain.com/used/thefile.zip)
[function.rename]: Permission denied in /home/domain.com/public/www/parser.php on line 546
U...
Hi for my research, i modify the c code that makes the php ( not the code that is written with php but that which actually makes php ). I want some way of compiling it and making it work with apache.. How do i do that?
...
I'm trying to follow the instructions here: http://www.php.net/manual/en/features.commandline.usage.php
I created a file named "vardump"
Added this code to the file:
#!/usr/bin/php
<?php
var_dump($argv);
?>
did chmod +x vardump
but I'm getting a permission denied error when executing the file:
shiki@Etna:~/projects/tests$ ./vardump
...
I have a table with several thousand rows. I'd like to be able to take one of those rows and duplicate it into a new row. What is the best way to do this?
Should I grab the rows data and assign each field into a variable? And then take those variables and insert them into a new row?
So that'd be two queries -- is there a more effi...
I am using PHP's SoapClient class to connect to paypal. I have a number of problems:
The paramaters I pass to the soap call are array('ReturnAllCurrencies'=>0, 'Version'=>'63.0') but as you can see in the request below, 63.0 is put in <param1> whatever that is. I don't even see ReturnAllCurrencies in the request.
In this request I ...
Can someone please kindly explain to me what really happen when you call the function setDestination()? According to the Zend "documentation" both of these should work, however only the first case puts the file where I wanted. The second just ditch it in /tmp
Case 1:
$file = new Zend_Form_Element_File('fileupload');
$file->setDestinati...
I am trying to access a second server with file_get_content and simple_load_xml and I get
failed to open stream: Connection refused
What can be the result?
allow_url_fopen=Yes
allow_url_include=Off
is my php.ini values
...
From time to time, I'm handed bloated, undocumented, buggy PHP code to fix. I have several tools I use to fix such code as quickly as possible.
One thing I'm not sure how to do that occasionally causes me grief is finding where a function is located (in which file it is defined). Note that I don't want to know where a function is called...
I want to add an additional functionality to a CMS I am making that will allow users to add content to a site via text message. The user should be able to upload an image and add text and send the message to a number which when received will update the database accordingly.
Can this be done, and can it be done via PHP because that's th...
I've created a simple template 'engine' in PHP to substitute PHP-generated data into the HTML page. Here's how it works:
In my main template file, I have variables like so:
<title><!-- %{title}% --></title>
I then assign data into those variables for the main page load
$assign = array (
'title' => 'my website - '
);
I then have ...
Hi all,
I'm trying to use scandir to display a select list of folders listed in a specific directory (which works fine) however, I need it to also add the child folders (if there are any) into my select list. If anyone could help me, that would be great!
This is the structure I want:
<option>folder 1</option>
<option> --child 1</opti...
Which is the question my partner said I'd not need answering, so to prove my point I removed php and simulated a server problem. And hey presto, the webserver serves up the PHP source as a download.
So, the question, is there a way to stop source being served up in the event of a server glitch, bug, or temporary loss of connection to th...