Is there a web site or tool that will convert a piece PHP code to C#?
something similar to
http://converter.telerik.com/
or
http://www.developerfusion.com/tools/convert/csharp-to-vb/
Hi,
Not sure if this is a available as I am new to the MVC model. But does any one have a link or link's to a article or blogs about building a MVC based PHP web application without using a Framework ?
Thanks in advance.
Are there any robust and mature HTML parsers available for PHP? A quick skimming of PEAR didn't turn anything up (lots of classes for generating HTML, not so much for consuming), and Google taught me a lot of people have started and then abandoned a variety of parser projects.
Not interested in XML parsers (unless then can consume non-well formed HTML) or hacking it on my own with regular expressions.
Clarification of Intent: I'm not interested in filtering of HTML content, I'm interesting in extracting information from HTML documents.
is it possible, that in php something, which was written as comment( like //comment...), makes some influence on the script? i remember, that once i use open source script, but when i delete all comments from it, it became non working. sorry for an abstract question. i haven't the code now, so i dont show it.
I was think of learning Perl cause I hear around town its good for system admin things. Would it be possible to use it to automatically install a php script? I need to install a custom script on a few different server and wanted to know how I could make something in Perl to do it (like move scripts over to directory and stuff)?
I'm very surprised I couldn't find this question here, which makes me very sure it is here and I just didn't see it. Regardless, I'll ask again.
How do I echo a forwardslash "/"?
echo <?php echo $_SERVER['HTTP_HOST'] ?> . '/directory/';
Thanks
-J
Hi,
Does anyone of you ever heard about a PHP open source solution that would have these features:
Users login/registration (ideally connect via Facebook)
Upload photos
Rich backend administration with different roles and views on the users and their uploaded photos
Cheers,
Nicolas.
Hi all,
I have an object in PHP with some very odd property names. I just need to know how to access a property when it's name is "//www.w3.org/1999/02/22-rdf-syntax-ns#type".
I found something that suggested
$object->{'//www.w3.org/1999/02/22-rdf-syntax-ns#type'};
but that doesn't seem to work.
Thanks in advance
Rob
I'm interested in knowing if there is a pure object oriented database for PHP. Something similar to zodb for Python.
I'm not really looking for an object-relational mapper. So no active record clones...
I am using config file which contains:
config.php
define('SYS_TITLE','My Application Title');
I load language local for gettext based on SESSION variable in another file included after the config file is loaded.
something like:
echo _(SYS_TITLE);
What is the best way to translate the SYS_TITLE without changing much of the code.
I am trying to install a copy of PHP 5 to my home directory on the school computer. The problem is that whenever I try, it complains that my copy of libxml2 is too outdated to work.
Is there any way I can install this without upgrading libxml2, since I don't have permission to upgrade.
Any suggestions?
How do I use the sha512 function for PHP?
Can I replace all my md5 funtions with the sha512 function?
Do I have to download something if so what?
Can any one provide examples? Thanks!
I have PHP configured so that magic quotes are on and register globals are off.
I do my best to always call htmlentities() for anything I am outputing that is derived from user input.
I also occasionally seach my database for common things used in xss attached such as...
<script
What else should I be doing and how can I make sure that the things I am trying to do are always done.
Hi, i need to convert a Utf-16BE in ISO-8859-1 in PHP (i'm not an expert in encoding so i don't know if Utf-16 and Utf-16BE are the same thing). I've read somewhere to use the mb_convert_encoding function but i haven't that function because i don't have the multibyte extension installed. So do you know an alternative method to do this?
Is there some way to detect if a string has been base64_encoded() in PHP?
We're converting some storage from plain text to base64 and part of it lives in a cookie that needs to be updated. I'd like to reset their cookie if the text has not yet been encoded, otherwise leave it alone.
I wrote a PHP shell script which include queuing jobs in centOS with 'at' command.
The queue jobs may vary in time and contents which means the system need to keep quite a large number of jobs.
The application logic will also be a bit difficult to setup with cronjob.
Is there a limit in number of queue jobs in centOS or is there any alternative way of queuing jobs?
Hi
Could you show me a Proof-Of-Concept for all of these: XSS, CSRF, SQL injection with both the source code and the attack steps for each?
Other attack vectors are welcome. The most complete answer gets accepted.
The configuration is a fairly standard one, as of PHP 5.3.2, core settings:
allow_call_time_pass_reference => Off => Off
allow_url_fopen => On => On
allow_url_include => Off => Off
always_populate_raw_post_data => Off => Off
arg_separator.input => & => &
arg_separator.output => & => &
asp_tags => Off => Off
auto_append_file => no value => no value
auto_globals_jit => On => On
auto_prepend_file => no value => no value
browscap => no value => no value
default_charset => no value => no value
default_mimetype => text/html => text/html
define_syslog_variables => Off => Off
disable_classes => no value => no value
disable_functions => no value => no value
display_errors => STDOUT => STDOUT
display_startup_errors => On => On
doc_root => no value => no value
docref_ext => no value => no value
docref_root => no value => no value
enable_dl => Off => Off
error_append_string => no value => no value
error_log => syslog => syslog
error_prepend_string => no value => no value
error_reporting => 32767 => 32767
exit_on_timeout => Off => Off
expose_php => On => On
extension_dir => /usr/lib/php/modules/ => /usr/lib/php/modules/
file_uploads => On => On
html_errors => Off => Off
ignore_repeated_errors => Off => Off
ignore_repeated_source => Off => Off
ignore_user_abort => Off => Off
implicit_flush => On => On
include_path => .:/usr/share/pear => .:/usr/share/pear
log_errors => On => On
log_errors_max_len => 1024 => 1024
magic_quotes_gpc => Off => Off
magic_quotes_runtime => Off => Off
magic_quotes_sybase => Off => Off
mail.add_x_header => On => On
mail.force_extra_parameters => no value => no value
mail.log => no value => no value
max_execution_time => 0 => 0
max_file_uploads => 20 => 20
max_input_nesting_level => 64 => 64
max_input_time => -1 => -1
memory_limit => 128M => 128M
open_basedir => no value => no value
output_buffering => 0 => 0
output_handler => no value => no value
post_max_size => 8M => 8M
precision => 14 => 14
realpath_cache_size => 16K => 16K
realpath_cache_ttl => 120 => 120
register_argc_argv => On => On
register_globals => Off => Off
register_long_arrays => Off => Off
report_memleaks => On => On
report_zend_debug => Off => Off
request_order => GP => GP
safe_mode => Off => Off
safe_mode_exec_dir => no value => no value
safe_mode_gid => Off => Off
safe_mode_include_dir => no value => no value
sendmail_from => no value => no value
sendmail_path => /usr/sbin/sendmail -t -i => /usr/sbin/sendmail -t -i
serialize_precision => 100 => 100
short_open_tag => Off => Off
SMTP => localhost => localhost
smtp_port => 25 => 25
sql.safe_mode => Off => Off
track_errors => Off => Off
unserialize_callback_func => no value => no value
upload_max_filesize => 2M => 2M
upload_tmp_dir => no value => no value
user_dir => no value => no value
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
variables_order => GPCS => GPCS
xmlrpc_error_number => 0 => 0
xmlrpc_errors => Off => Off
y2k_compliance => On => On
zend.enable_gc => On => On
I've wrote a PHP script to export a Foxpro database to other formats by using ADODB (http://phplens.com/lens/adodb) library to access Foxpro OLE DB provider.
Everything worked fine except the date fields are mangled and become like these:
11/17-/2-00
3/4/-20-08
By comparing to actual data I can guess that it is probably in the format of MM/DD/YYYY or m/d/YYYY.
How can I properly export the date field?
Hi,
Rasmus Lerdorf (creator of php) advocates procedural style where as most successful way has turned out to be non-procedural. What is the benefit of procedural over non-procedural approach at last? Why does he advocate that?
gpg = gnupg.GPG(gnupghome="/tmp/foldername", verbose=True)
print "Import the Key :", gpg.import_keys(pub_key).summary()
this two lines of code gives me public key exract which i further used in encryption.
i need to get the equivalent metods in php .
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!
Basically, I want to do some HTML screen scraping, but figuring out if it is possible in PHP.
In Python, I would use
PyQuery.
In Ruby, I would use Nokogiri.
Hello,
I have some CSS style that does not work in IE and that works on ff and chrome. I want to be able to use if else. But can PHP ifelse be included in the .css file for me to achieve?
Thanks
Jean