Does anybody have a PHP (or other language) script for drawing a spiral. A simple (Archimedean spiral) would be just fine. Of course the principle is simple but coding it in SVG or GD would take some time, so I wonder if somebody has one ready :-)
...
I'm almost losing it, i really hope someone can help me out!
I'm using Doctrine with CodeIgniter. Everything is setup correctly and works until I generate the classes and view the website.
Fatal error: Class 'BaseObjecten' not found in /var/www/vhosts/domain.com/application/models/Objecten.php on line 13
I'm using the following bo...
A few of my customers are reporting that they are getting "500" Internal Server errors lately. I believe it might be caused by various plugins they are using but each time, the hosting company (multiple hosts) are saying that the htaccess file had to be replaced to fix the issue.
I'm submitting the code below from my custom theme becaus...
I'm trying to get content from an RSS2 feed from one of my sites and use it in another site.
The feed is here. And the code I'm using is taken from this nice site and has been modified like the following:
$doc = new DOMDocument();
$doc->load('http://tripleax.com/john/?feed=rss2');
$arrFeeds = array();
foreach ($doc->getElementsByTagNa...
I have a custom content-type called 'document' On this content-type, I have a File field where a user can upload a document.
Assume the path to a document node is /somesite/document/tester
I would like to be able to link to /somesite/document/tester/file and it automatically go to the file that is uploaded to the file field of the nod...
I read so many post and I found many variations about how to get save to insert vs update but couldn't find something that would work for me.
I am guessing that preSave would be the way to go if preSave() is being executed automaticly by save() if present.
columns:
email:
type: string(255)
unique: true
email: true
I nee...
What do you guys do (system/framework wise) to safeguard things like
employees writing malicious code to destroy your server
employees reading all your database sensitive information
generally programmers that have access to your back-end and potential damages that they can do.
Is there any PHP scripts that guards against these, etc....
How can I do an if statement based on the value of a mysql table cell. For example, I have a table of people with a column called marital_status. This column has one of two values: yes or no. But this doesn't work:
$query = mysql_query("SELECT marital_status FROM people WHERE first_name = 'John'");
while ($row = mysql_fetch_assoc($quer...
Hi, I am trying to do some C# SOAP calls and can't seem to get any good examples on how to do it. I read an old question of mine about a SOAP call in PHP and thought maybe asking you guys to rewrite it in C# would be a good place to start.
Here is the PHP code:
$client = new SoapClient('http://www.hotelscombined.com/api/LiveRates.asmx...
How convert PHP value from windows-1257 to UTF-8? I tried many ways, but they was not successful. I have lttu�s and I wanna convert this to littūs.
utf8_encode();
iconv_set_encoding("windows-1257", "UTF-8");
mb_convert_encoding()
Doesn't work. :(
Can anybody help me?
...
I have created a searchfrom.php for wordpress but then it's giving me a false returns you can try the search yourself here
Here is the code for my search form
<form method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
<input type="text" class="form-text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" />
<in...
Can someone please recommend me a good editor for PHP that auto uploads on save? Basically, I do not want to store any files locally .. thx.
...
Hello people,
I am new here.
I would like to know how can I display HTML code after a video is finished playing. I am using FlowPlayer (http://www.flowplayer.org) .
I have tried to achieve this using JW Flash Player (http://www.longtailvideo.com/players/jw-flv-player/), but was unable figure out anything.
Also, let me know if it's po...
I'm trying to find a tool that I can use to generate markup programatically (non-irl word). Here is an example of what I'm trying to accomplish in pseudo-code...
$htmlDoc = new HTML_Document();
$htmlDoc->setTitle('Cool Title');
$htmlDoc->addJs('some_js_file.js');
$htmlDoc->addStylesheet('some_css_file.css');
$divElement = new HTML_El...
I am trying to understand how PHP apps check to see if a user is logged in. I am specifically looking at mediawiki's code to try to help me understand, but these cases should be fairly common in all php apps.
From what I gather, the main cases are:
A user just logged in or was created, every time they visit the page PHP knows its them...
I've tried integrating sfPHPOpenIdPlugin but that hit a dead-end since it's built for Symfony 1.2 and relies on deprecated PHP functionality; I also had a go with sfGoogleLoginPlugin which did authenticate correctly but lacks extended capability to retrieve user details (+ would restrict me to Google; obviously).
I'm thinking the most v...
I've looked around and nothing seems to work:
$file = '/path/to/file.csv';
$cmd = 'mysqldump DATABASE TABLE > '.$file.' --host=localhost --user=USER --password=PASS';
$cmd .= ' --lock-tables=false --no-create-info --tab=/tmp --fields-terminated-by=\',\'';
exec($cmd);
Everything I try creates an empty CSV file. Any ideas? Thanks much...
hi,
I've added some php flags in my htaccess in order to change some php
config settings
as I dont have access to the .ini file
I'm wondering what effect that has on my website load speed,
is it slower?
thanks
...
Hey guys, one more quick question for any experts out there. I have a form that is submitted via jquery ajax, works perfectly (I tested), and uses a form token (I set a session variable and pass through form and check that the token is equal to the posted token to prevent csrf attacks, see below...). My question is that I defined my sess...
StackOverflow implements it like this:
<link rel="stylesheet" href="http://sstatic.net/so/all.css?v=4542">
Every time the referenced files change, the href attribute of the link tag is updated in the HTML code, thus supporting caching and updated referenced files.
My question - how do you retrieve the subversion version of that c...