Hi guys,
I have build a php authentication for my site http://www.skyeye.cc/ and wanted to make sure I didn't forget any security holes... let see if you can hack into it?
Thanks!
A non-hypothetical but abstracted situation:
I have a domain www.foo.com, from which I'm making an AJAX POST to beta.foo.com. Examining the XHR object, I see a response header of 200 OK, but no response text - I even get a response 12B long, which is the exact response (a 12-character string) that I'm expecting - but the response text is blank.
If this is a cross-domain issue, why am I getting 200 OK, and better yet - why am I seeing the PHP functions fire on the beta.foo.com side - yet getting no response?
to learn a library/framework i think the best way would be to use a class method and then see what code is executing in live.
then you see the method chain (input and output of each) and can also read the comments.
is there a such feature in any IDE or external application for php?
I've tried to code a recent posts script for my custom WP theme, however, it occurs to me that since WP ships with a recent posts widget, ideally I should just be able to call that from within my sidebar.php script, passing it the "Number of posts to show" parameter.
Anyone know how to do this?
I'm passing an object to mustache and this object has a method with one parameter. Is something like this possible with Mustache and PHP?
{{object.method(parameter)}}
If it gets too laborious to achieve this with Mustache, what template engine would you recommend?
Remember I need to pass parameters to object methods while in the view
context (like we do with helpers). The nearest as possible to mustache syntax is welcome.
Hi
I am sending email from my localhost There occurs a server error
Failed to connect to mailserver at "smtp.bizmail.yahoo.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set()
when i host my project to the server my function works
Now i need a solution such that the mail functionality must work in my localhost too
I have a PHP script that caches a remote XML file. I want to XSL transform it before caching, but don't know how to do this:
<?php
// Set this to your link Id
$linkId = "0oiy8Plr697u3puyJy9VTUWfPrCEvEgJR";
// Set this to a directory that has write permissions
// for this script
$cacheDir = "temp/";
$cachetime = 15 * 60; // 15 minutes
// Do not change anything below this line
// unless you are absolutely sure
$feedUrl="http://mydomain.com/messageService/guestlinkservlet?glId=";
$cachefile = $cacheDir .$linkId.".xml";
header('Content-type: text/xml');
// Send from the cache if $cachetime is not exceeded
if (file_exists($cachefile) && (time() - $cachetime
< filemtime($cachefile)))
{
include($cachefile);
echo "<!-- Cached ".date('jS F Y H:i', filemtime($cachefile))." -->\n";
exit;
}
$contents = file_get_contents($feedUrl . $linkId);
// show the contents of the XML file
echo $contents;
// write it to the cache
$fp = fopen($cachefile, 'w');
fwrite($fp, $contents);
fclose($fp);
?>
This is the XSL string I want to use to transform it:
<xsl:template match="/">
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<xsl:apply-templates select="messageList" />
</Document>
</kml>
</xsl:template>
<xsl:template match="messageList">
<name>My Generated KML</name>
<xsl:apply-templates select="message" />
</xsl:template>
<xsl:template match="message">
<Placemark>
<name><xsl:value-of select="esnName" /></name>
<Point>
<coordinates>
<xsl:value-of select="latitude" />,<xsl:value-of select="longitude" />
</coordinates>
</Point>
</Placemark>
</xsl:template>
I want to actually transform XML input and save/return a KML format. Can someone please help adjust this script? This was given to me and I am a little new to it.
In my application, I ask the user to enter their cell and select their provider. I append the provider's email and create the message and fire via php.mail()
The problem is that no matter what the header info is, the message comes from '1010100001' on some phones (like AT&T and the iPhone). When testing on my Verizon phone, I get the proper email address as the sender.
Any idea how I can send a clearer message?
When i call this:
exec("clamscan --no-summary file.php", $out, $int);
with good parameters, the script doen't finish. The file is too small and in console it comand duration is 2 seconds.
If i put incorrect parameter the script finished and return correcte errorcode.
With shell_exec it does the same.
Hello !
Is it possible to get all weekdays names with some PHP's date function without timestamp ?
For example just giving as a param number of a weekday ?
Hi
OK I need to figure out how to count how many numbers are in the following example.
07000000000,07000000001,07000000002,07000000003,07000000004 etc...
I have tried the following PHP functions.
explode, implode, count, foreach and for.
None of them seemed to have worked and I am really stuck now.
Any help will is appriciated.
Kyle
I'm looking for an IDE with use with the Symfony Framework.
I have a bit of experience using the NetBeans 6.5 IDE but it does not always seem to complete the class methods, plus it doesn't seem to have any PHP code snippets built in.
Here are the features I would ideally like to have, in order of importance, from an IDE:
Code completion of all the Symfony and Propel class methods (I can never remember them)
Code templates,(class skeletons, HTML structures, Symfony templates?)
Straight-forward code debugging
Source Control
Hello
A have price data stored like this: 10.25
And percentage data like this 1.1100 (1.00%)
I need a function that accurately multiplies the price by the percentage. (in php)
Thanks
I want to make sure the input is A)a number and B)has at most 2 decimals.
$number[$i]=int(100*$number[$i])/100;
I imagine there is a more efficient way to do this... any suggestions? (using PHP).
I need to validate a username in php, it can be:
Letters (upper and lower case)
Numbers
Any of these symbols :.,?!@
up to 15 characters OR 16 if the last character is one of the following #$^ (it can also be 15 or less with one of these 3 characters at the end only)
How do I do this?
When I use the form helper to make a time input,usaually I write code as follows
<?php
$options = array(
'label' => '',
'type' => 'datetime',
'timeFormat'=>'24',
'separator'=>'-'
);
echo $form->input('Service.endtime',$options);
?>
But now I get a problem that I want to make a time input style such as
month-day-hour
Then how can do this with setting some parameters in the helper?Suggestions would be appreciated.
I have an int(11) column which is used to store money. I read some of the answers on SO and it seems I just need to update it to be a decimal (19,4) data type.
Are there any gotchas I should know about before I actually do the converting? My application is in PHP/Zend and I'm not using an ORM so I doubt I would need to update any sort of class to consistently identify the data type.
I am new beginner, is it possible the covert flex data grid to CSV file format with out use any backend (java,php ..) file ? . Because I tried with out use bankend . is it convert or not ? So any one give suggest me . or which is best method to convert ?
Example link on my footer
$powered = 'Powered by <a href="htp://stackoverflow.com">Stackoverflow</a>';
theme file
<?php echo $powered; ?>
How to make if $powered removed from my footer and the error/reminder notice it.
Example die('Do not remove the powered link')
I guess these are all questions that everyone must just know, because I'm not seeing this in the documentation :-D
I understand that the public folder is the folder that the world has access to.
I know it is the case with the css folder, but in migrating a traditional php website over, will my /images folder, /js folder /mp3s, etc Will those all just also be public folders that will be accessed via the layout or view.phtml pages?
Thanks!
I am trying to create a link, which will, allow my paginated search to go onto the next page of results including the search term in the url
I get the following error with the link I have created
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/dd615/public_html/searchPage.php on line 47
here is the link
echo "<a href='{$_SERVER['PHP_SELF']}?search=$_GET['search']?pagenumber=1'> FIRST </a>";
any help would be greatly appreciated
Is it possible to display HTML character codes stored in a text field in SQL to a textarea without rendering them as their appropriate character? i wasnt & to show up as & (the way it's stored in the table). Or is their a way I should be storing the HTML so I won't need to worry about this?
(site is using PHP)
I've got broken data.xml file, how i can fix it with php?
I need to add at the beginning of the file two lines
<?xml version="1.0" encoding="UTF-8"?>
<archive>
...<xml data>...
And at the end of the file
</archive>
Does anyone have any ideas or solutions how to add and save xml structure?
Hello,
Is there a way i can programmatically determine the status of a download in Chrome or Mozilla Firefox. I would like to know if the download was aborted or completed successfully.
For writing the code id be using either perl,php or python.
Please help.
Thank You.