lur
Members-
Posts
53 -
Joined
-
Last visited
Never
Everything posted by lur
-
Maybe cURL isn't following redirections, have a look at CURLOPT_FOLLOWLOCATION (http://www.php.net/manual/en/function.curl-setopt.php)
-
Limit access to page to only local ip (192.168.1.xx)
lur replied to farkewie's topic in PHP Coding Help
if (substr($_SERVER['REMOTE_ADDR'], 0, 10) !== '192.168.1.') exit(); if (!preg_match('/^192\.168\.1\./', $_SERVER['REMOTE_ADDR'])) exit(); if (0 !== strpos($_SERVER['REMOTE_ADDR'], '192.168.1.')) exit(); -
[SOLVED] convertine simple XML doc to html table with php
lur replied to prakash's topic in PHP Coding Help
$xml = file_get_contents('http://example.net/somexmlfile.php?url=msn.com'); -
$values = "87a003000c28"; $a=hexdec(substr($values, 0, 2)); $b=hexdec(substr($values, 2, 2)); $c=hexdec(substr($values, 4, 2)); $d=hexdec(substr($values, 6, 2)); $e=hexdec(substr($values, 8, 2)); $f=hexdec(substr($values, 10, 2)); echo $a^$b^$c^$d^$e^$f;
-
[SOLVED] convertine simple XML doc to html table with php
lur replied to prakash's topic in PHP Coding Help
if (phpversion() >= 5) { echo '<table>', PHP_EOL; foreach (simplexml_load_string($xml) as $key => $value) { echo '<tr><td>', $key, '</td><td>', $value, '</td></tr>', PHP_EOL; } echo '</table>', PHP_EOL; } -
__FILE__ - The full path and filename of the file. If used inside an include, the name of the included file is returned. dirname - Given a string containing a path to a file, this function will return the name of the directory.
-
Nope. (int) 'STRING' = 0; (bool) 'STRING' = TRUE;
-
URL file-access is disabled in the server configuration http://google.com/search?q=allow_url_fopen
-
Starting a buffer within a buffer callback function?
lur replied to Jiokah's topic in PHP Coding Help
function ob_callback($buffer) { ob_start(); // Fatal error: ob_start(): Cannot use output buffering in output buffering display handlers } ob_start('ob_callback'); ob_end_flush(); function _flush() { $buffer = ob_get_clean(); ob_start(); require 'foo.php'; echo $buffer . ob_get_clean(); flush(); } ob_start(); echo date('r'); _flush(); -
http://php.net/array_count_values $a = array('a','b','c','a','a','c','d'); $b = array_count_values($a); echo $b['a']; // number of a's print_r($b);
-
Starting a buffer within a buffer callback function?
lur replied to Jiokah's topic in PHP Coding Help
function ob_callback($buffer) { $buffer; // holds buffer } ob_start('ob_callback'); // ... ob_end_flush(); -
http://php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc The closing identifier must begin in the first column of the line. Remove the spaces infront of "EOD;".
-
http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
-
There's probably nothing wrong with your code, failed to open stream: Permission denied Change the permissions on the file. http://www.dartmouth.edu/~rc/help/faq/permissions.html http://en.wikipedia.org/wiki/Chmod
-
My OOP pagination functions aren't working... New to OOP!
lur replied to Foser's topic in PHP Coding Help
You have no method called db_limiter(), you have a variable called $db_limiter and a method called page_limit_db() that returns $db_limiter. // using the variable, removed trailing parenthesis. while ($row_info = mysql_fetch_assoc($paging_system->db_limiter)){ // using the page_limit_db() method while ($row_info = mysql_fetch_assoc($paging_system->page_limit_db())){ -
[SOLVED] MySql result loop problems only first record shown
lur replied to allmambo's topic in PHP Coding Help
You overwrite $row in your second while() loop. The second while() loop doesn't print anything, it just loops over the result rows and assigns variables until there are no more results. If you want to print all results you'll need to do so inside the loop. -
[SOLVED] Text Returned From DB Gets Cutoff When Placed In A Text Field
lur replied to angelopc's topic in PHP Coding Help
<input type="text" value="<?php echo htmlentities($string_in_database, ENT_QUOTES); ?>" /> -
"Content-Length: " . strlen($some_string);
-
The double comma is the Scope Resolution Operator, in this case it's probably used to call the static method "getInstance" in the "Person" class. This method probably returns an object (instance of the class "Person"). The single arrow (->) is the standard object "operator", $person->getChildFamilies() calls the "getChildFamilies()" method in the $person object/instance of the class "Person". http://php.net/manual/en/language.oop.php http://php.net/manual/en/language.oop5.php
-
[SOLVED] Web Crawler > Preventing never ending loop
lur replied to drewbee's topic in PHP Coding Help
When you follow a link from the starting point, you're at a depth of 1. Every subsequent link you follow in that "thread" will increase the current depth. Set a limit for how deep the crawler is allowed to go. -
http://gtk.php.net/
-
[SOLVED] variable not being set when using mysql_num_rows
lur replied to rbragg's topic in PHP Coding Help
When using mysql_num_rows(), you're never actually fetching the result data. if (mysql_num_rows($techMatch) > 0) # found existing tech { $techMatch = mysql_fetch_assoc($techMatch); //added $tNum = $techMatch['t_num']; } -
My default/standard/unmodified Apache 2.x install is about 32 megabytes in size.
-
When $display['p'] is empty, you set $f to some html for an empty cell. When it is not empty, you set $file to a cell containing $display['p']. Finally you print neither $f nor $file, but $display['f'].