So my host just updated all their hardware and software and they have decided to no longer support any of the PHP FTP functions (ftp_connect, etc).
Anyone know a way around this? Luckily I have classed all my PHP functions so I will only need to build the work around once (If there is one?)
Maybe Upload using fSocket? Any examples / ...
Why when set php cookie path to "/" doesn't work for every subdirs in the domain, but just for the current diretory.
cookie is set like: setcookie("name", "val", expire_time, "/");
it just doesn't want to work.
Any help appreciated.
...
There is a button in a site like this:
<form method="POST" action = "/invite/1233">
<input type="hidden" name="t" value="4b16d">
<button type="submit">submit</button>
</form>
How can I "emulate" pressing this button for example in bash? Is it possible to make an adress that I can click instead of this button? Why http://site-dom...
Hello,
I am about to use Zend_Paginator class in my project. I found examples of the class on the internet. One of them is
$sql = 'SELECT * FROM table_name ';
$result = $db->fetchAll($sql);
$page=$this->_getParam('page',1);
$paginator = Zend_Paginator::factory($result);
$paginator->setItemCountPerPage(10));
$paginat...
Hello:
I am attempting to use PHP and cURL to:
Access a web-form & maintain session
Post the data to that form with session in place
In my head, I see it as two separate functions, one to get the form (initiate session) and another to post the data.
...
I want to use a DB Singleton i created, in several Methods of a Class. Is it more appropriate to Instantiate the Singleton individually in each Method, or to Instantiate it through the __constructor() and access it from a variable in each method?
Thanks.
...
I was poking around the PHP 5.3.1 source tree, and decided to take a look at main.c. I was curious what was happening behind the scenes whenever PHP runs.
I was under the impression that any C or C++ program starts execution in a function named main, but I don't see a function with that name in main.c.
Where does PHP code actually sta...
I have a stored MySQL procedure that takes a customer number and a currency as input. It outputs an array using a select statement. The output array is comprised of Balance and NetBalance,
If I call the procedure from MySQL as "call GetAccountBalanceByCurrency(500,'USD')" I get the correct results.
However, if I call it from PHP as $...
I wish to call a web service, using SOAP, from PHP (using the included SOAP extension). The web service in question is http://www.webservicex.net/CurrencyConvertor.asmx
Now the Currency type is an enum, and I cannot figure out how to work with these in PHP in order to be able to call the 'ConversionRate' function. I know I have to do so...
I'm writing software that requires the user to have php 5, but nothing else in the way of extra apache modules, etc.
Is there a vanilla php5 method for unzipping an archive?
I found this:
http://nz2.php.net/manual/en/function.ziparchive-extractto.php
But can everyone using php 5 use this? No extra modules necessary?
...
I've been taken on board to work on a PHP based web application. One part of the application generates thumbnail images for MS Office documents on demand, and it uses MS Office + the VeryPDF docprint utility to do this. Because of this one requirement, the system is running on Windows Server 2003 + IIS.
I would prefer to have the syst...
Ok, I'm not sure if the title is that effective but its the best I could come up with.
Basically here is the scenario.
I have 11 categories. In each category, I have items, but one category might have 1 item, 1 might have 20.
Now i want to separate the 11 categories into 5 stacks or columns.
I want each of the stacks to contain an eq...
I'm using the MVC framework CodeIgniter for my work, if it's relevant.
In one of my pages/controllers, I want to capture the HTML outputted by another page on the site as a string (to use as an email or newsletter). I tried:
$string = file_get_contents('http://www.examplesite.com/path/to/page');
But $string just becomes false, which ...
Hello,
I am looking to distribute a symfony web app, but don't want to reveal its source code.
I know it is tough to obfuscate PHP, but I was wondering if there are any closed or open source solutions to obfuscate and/or encode the backend code so that someone receiving the app can run it but wouldn't be able to view the source code?
...
I'm currently working on building an application in CakePHP. There's a quite extensive existing data set that's conceptually a tree, but wasn't previously stored as one. What I mean by that, is there's no real relationship defined in the data.
The problem I'm having is getting it to work correctly with the CakePHP tree behaviour. B...
Hi,
I'm trying to run a cron job so that a php script will run every 10 minutes on my server. The script updates a database. Right now my crontab looks like:
* /10 * * * * /usr/bin/php /home/user/public_html/domain.com/private/update.php
However, the php script never seems to run. I've also tried reloading cron after updating the cr...
I'm creating a contest sign-up page for our annual math competition at my school. It requires some AJAX like behavior when you click and select an item in a dropdown list.
I've gotten an event to fire when I select something in the dropdown (I'm currently showing an alert box):
<script type="text/javascript">
$(function() {
...
How do I have it render leading 0's for 1-9 ?
<?php foreach (range(1, 12) as $month): ?>
<option value="<?=$month?>"><?=$month?></option>
<?php endforeach?>
...
Hi All,
I have installed the Net_Geo pear package on my PHP Server.
This is the code I am using,
require_once('Net/Geo.php');
// new Net_Geo object
$net_geo = new Net_Geo();
// fetch the client's IP
$ip = $_SERVER['REMOTE_ADDR'];
// fetch information array from net_geo
$results = $net_geo->getRecord($ip);
// output
echo "Singl...
I have a table setup the following way
`id` int(11) NOT NULL AUTO_INCREMENT,
`eventid` int(11) NOT NULL,
`invites` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
In that table i have rows which look like this
1, 127, '32215, 55648, 89887, 55555, 66666, 33333'
2, 168, '44444, 33333, 121212, 0540541'
How would i se...