I have a classifieds website, and a partner of us (who runs another classifieds website) need to have access to a file on our server.
The file is called 'partner.php'.
This file simply prints out some information about the classifieds on our site.
So for our partners, they would just need to access "www.domain.com/partner.php?id=1234"...
Hi,
I'm trying to write some unit tests for a class that connects to an API.
What I want to do is alter the class so that instead of actually connecting to the API, it instead loads a pre-fetched constant fixture. The method within the class that actually does the cURL request and returns the data is protected, and this is the one I wa...
If i send bitmap data from Flash AS3, to PHP and then PHP turns the bitmap data into a image file and saves on server... Would it take too much resources?
I mean, The Bitmap Data could contain too much pixels etc does that affect the resources?
If 10-100 people send data simultaneously is it going to cause problems...
What kind of spec...
Hi,
I am developing a PHP application which will handling many company articles.
Now I am creating a page which should order articles BY DATE ie all articles created in a certain day are shown with the appropriate heading and so on for all the articles.
I have used Unix timestamps to save the dates in the MySql db but I cant find cod...
Hi,
I am an affiliate of an online store, and I promote it through my own website which is targeted for a specific language.
One of the issues i'm having with my affiliated site, is that he would not translate his website to the language I am promoting it in. Meaning, when I redirect to his website with my referral code, the visitor is...
I am getting a file with a faroese name and trying to save it in a PHP script:
2010_08_Útflutningur.xls
In Ubuntu 10.04 LTS is saving it as :
2010_08_�tflutningur.xls (invalid encoding)
I've installed and run utf8-migration-tool, but with no effect.
Is this a ubuntu error that I can fix or I just have to give up and modify the nam...
Hi,
I'm trying to perform a redirect using cURL. I can load the page fine, that's not a problem, but if I load say google.com non of the images load and the site does not work (obviously because its just printing the HTML and not actually doing a redirect).
Is there any way to perform a redirect using cURL? Sort of similar to how ...
...
Hey,
so I am trying to match word in a wall of text and return few words before and after the match. Everything is working, but I would like to ask if there is any way to modify it so it will look for similar words. Hmm, let me show you an example:
preg_match_all('/(?:\b(\w+\s+)\{1,5})?.*(pripravená)(?:(\s+){1,2}\b.{1,10})?/u', $item, ...
Hi,
I am using flexigrid for one of my projects and I need to come up with a way to change the image source depending on the value of one of the cells. For people who are used to flexigrid, I have the following code:
$json .= ",'".addslashes("<span><img src='' id='flag' />" . $row['availability']. "</span>")."'";
and my javascript t...
I have a Amazon EC2 Linux micro instance server that I need to fire an hourly process on. I have chosen to use crontab and cannot get it to fire.
I placed a *.sh file in the /etc/cron.hourly
If I run $ sh /etc/cron.hourly/notify.sh the script behaves as expected.
I have checked to see if the cron service is running and it is.
I have...
I'm wondering if anyone has found or written an extension that would allow a magento website administrator the ability to add values to their products attribute while adding the product. For example, if I sell books and want the book author to be in a drop down list so that it would be used in layered navigation, it seems odd that I wou...
I'm looking for something similar to preg_quote, but for the MySQL regexp syntax.
Any ideas?
...
I am having a little trouble with parsing XML from a google checkout response. The XML is coming straight from the google server so there is no problem with the XML itself.
I want to get hold of all the new-order-notification tags
I tried this but get an empty array() returned everytime.
$xml = new SimpleXmlElement($raw_xml);
$notifi...
I have an internal suggestion box application where all users can have the same username and password ..
so I'm doing an autologin with a jquery form submit.. this works great in FF and Chrome but in IE.. it populates the values in the user/password form fields.. does the submit.. and then just does it again over and over.. ( the appl...
I'm using DirectoryIterator to list files. In this scenario my dir contains 19 files.
I need to create a list which wraps 7 files into a <div>.
I must be tired, because I'm not able to do this simple task.
My code is updated to reflect suggestions below:
$i = 0;
echo '<div class="first_div">';
foreach ($dir as $fileinfo) {
if ($fi...
Hi,
I manage a rather large traffic website. On each page we keep track of a visitors online by running the following code. We then have a cron which deletes the records which are older than X minutes.
if(!isset($_SESSION[users_online_id])) {
if(!(date('H')=='02' && date("i") >= 37 && date("i") <= 45)) {
# NEW VISITOR - DOESN'T HAVE...
Here is what happens to some users of IE8 when using the website i am responsible for:
person logs in, credentials are verified, zend auth is created. After login, user is redirected to the default page.
the default page has 5 ajax request that start on document ready. The ajaxes somehow don't have the php session in the request and r...
Hi,
I'm coding a team collaboration web app in PHP, and I have a few events that users get notified about through email and/or SMS. The current way I'm doing it is as follows:
Every user has his notification settings in the database as boolean variables.
Say users would be notified when someone comments on the team's page. When the fu...
I have an XML File:
<?xml version="1.0" encoding="iso-8859-1"?>
<deadlines>
<deadline>
<date>2010-07-01</date>
<text>Residency Application for Fall Due</text>
</deadline>
<deadline>
<date>2010-06-01</date>
<text>Residency Application for Summer Due</text>
</deadline>
<deadline>
...
Friends,
I have a problem............
Help me please........
Am getting the image url from my client, i want to store those images in my local folder.
if those images are in less, i will save them manually
But they are greater than 5000 images.........
Please give some code to down load all the images with PHP
...