I'm currently attempting to code one for part of a college project - binary/hex handling and cryptographic functions are well regarded in the mark scheme, so I thought I'd kill two birds with one stone.
However, the documentation availible on the algorithm itself is thorough but confusing. Is there a prexisting PHP libary/class that I c...
while ($row= mysql_fetch_array($result, MYSQL_ASSOC))
{ $id=$row[id];
$html=<<<html
<tr><td>
<input style="float:left" type="checkbox" id="$id" name="myBoxes[$id]" value="true">
<span style="float:left">$row[content]</span>
<span style="color:black;float:right">$row[submitter]</span></td></tr>
html;
echo $html;
}
$html=<<...
Hi
I need to come up with a way to uniquely identify computers.
Something like the system id or info from CPU that can't be hacked easily
be obtained in php application run time and then sent over the internet to a central database to activate or validate license keys.
System Info:
Web Shared Hosting or Local network
Linux(can be a...
Does anyone with more knowledge than me about regular expressions know how to split up html code so that all tags and all words are seperated ie.
<p>Some content <a href="www.test.com">A link</a></p>
Is seperated like this:
array = { [0]=>"<p>",
[1]=>"Some",
[2]=>"content",
[3]=>"<a href='www.test.com'>,...
In by DB I have a table with a field called 'fk_ownerID'. By default, when I add a new table row, the 'fk_ownerID' is empty. In Toad for MySQL, this is shown as {null}. If 'fk_ownerID' is given a value, and I later remove this value, I set fk_ownerID = "".
Now, I have the following code:
$result = $dal->getRowByValue('tableName','id', ...
Hi,
I have worked for years with Dreamweaver and Interakt extensions to build hundreds of PHP websites. Interakt was great for me because I could develop PHP websites and small back offices in a couple of hours. Integrated modules like 'file upload', image resizing, automatic table creation,... were tools I used and that I still need tod...
Hi All,
was wondering what was the best way to debug PHP on my local machine. I use MAMP on mac os 10.5
thanks,
Patrick
...
I have two tables. Categories and products.(using codeigniter)
Categories
CREATE TABLE IF NOT EXISTS `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`shortdesc` varchar(255) NOT NULL,
`longdesc` text NOT NULL,
`status` enum('active','inactive') NOT NULL,
`parentid` int(11) NOT NULL,
PRIM...
i want to load contents of external url like (http://www.google.com) into div,
i the way which will readable by search engine crawl.
in any one of (jquery / ajax / php )
Thanks
...
I'm using domdocument to create an xml file:
$dom = new DOMDocument('1.0', 'iso-8859-1');
echo $dom->saveXML();
When I click the link to this file, it simply displays it as an xml file. How do I prompt to download instead? Furthermore, how can I prompt to download it as 'backup_11_7_09.xml' (insert todays date and put it as xml) inste...
Could you rewrite this into a cron that will run every day for longer than 30 seconds. Also, do i need to edit the .htaccess or php.ini file in the cron.php directory to say something. Over the browser it runs just fine for longer than 30 seconds, over the shell, it runs just fine too. But as a cron set task, it dies after 30 seconds. Im...
here is the snippit
$thisFile = str_replace('\\', '/', __FILE__);
$docRoot = $_SERVER['DOCUMENT_ROOT'];
$webRoot = str_replace(array($docRoot, 'library/config.php'), '', $thisFile);
$srvRoot = str_replace('library/config.php', '', $thisFile);
if i save this into test.php as a file. the section that im getting confused on is how the...
The input 7|12|1|14|2|13|8|11|16|3|10|5|9|6|15|4 returns 0 by the PHP -code, while 1 by Python code: 1 means that the sums of the 4x4 magic square are the same, while 0 means the reverse. Python code is correct.
The problem of the PHP code seems to be in the function divide's for -loop, since PHP gives too many sums.
How does the logi...
Is there a way to limit the depth DOMXPath::query will look at?
Consider the following document:
<div>
<span>
<div>
</div>
</span>
</div>
How could I limit the query
//div
So it only matches the first level and not the descendants?
...
So I have a User table and a History table with User hasMany Histories, and I'm trying to implement pagination on the user table.
My problem is that I have search, and some of the things one can search by are things in the History table. Is there a way to filter pagination results based on data in a table associated by hasMany? Containa...
Hi
I did register form in with zend form
$password = new Zend_Form_Element_Password('password');
$password->setLabel($this->_translate->_("Password:"))
->setRequired(true)
->addValidator('stringLength', true, array(4, 32));
$confirmPassword = new Zend_Form_Element_Password('confirmpassword');
$confirmPassword->setLabel($this->_...
What is the best way to implement web services in PHP? I have heard about libraries like NuSOAP and WSO2 web service platform, But don't know what is the best ( or a good and easy to learn) for using web service in PHP?
...
Hello
How can i itarate this array
array(2) {
[0]=>
array(1) {
[0]=>
array(14) {
[0]=>
string(17) "ratosk8@censored"
[1]=>
string(23) "alokkumar.censored"
[2]=>
string(24) "uuleticialima1@censored"
[3]=>
string(23) "camera.clicks@censored"
[4]=>
string(24) "billtha...
I want to be able to detect (using regular expressions) if a string contains hebrew characters both utf8 and iso8859-8 in the php programming language. thanks!
...
I'm brand new to php and I'm trying to work with some includes in my site and can't quite figure out how to make them all work correctly.
My site structure is as follows
/ROOT/
Config.php
Index.php
/ADMINISTRATION/
Index.php
mustInclude.php
/USERS/
Index.php
If "mustInclude.php" includes "Config.php...