Jump to content

jeff00seattle

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jeff00seattle's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Take this simple PHP script which gets contents from a website: $response = file_get_contents(http://www.google.com); If I call this script within a PHP file as a script through Eclipse PDT, it provides a response. If I call this script within the same PHP file was a webpage through IIS 7, it provides no response (false). If I run this same script on the same box in WAMP, no problems. The same is true if I use PHP cURL functionality. $ch = curl_init(); $timeout = 0; curl_setopt ($ch, CURLOPT_URL, 'http://www.google.com'); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $response = curl_exec($ch); curl_close($ch); Jeff in Seattle
  2. Hi I having beating my head over the following, I want to trim all right spaces from match before replace, and then with replacement append a value with a single space, using preg_replace(). For example, I have a text that is filled with dates with Month/Day and Month/Day/Year. I want to replace all Month/Day(s) and append with Year. To elaborate: Match 6/13 => Replace 6/13/2009 6/13/2009 => Do nothing So far, the following Match regex works: '[0-9]{1,2}\/[0-9]{1,2}\s{1,}' 4/28 hfdkkdi sielsl fidijg. 5/14 fiisollei sikedi jdsildh 6/3 diel dkisl hgiels dhpwld, 6/13/2009 yeus spwiv wojje rtyu But replace '\0/2009 ' does the following: 4/28 /2009 hfdkkdi sielsl fidijg. 5/14 /2009 fiisollei sikedi jdsildh 6/3 /2009 diel dkisl hgiels dhpwld, 6/13/2009 yeus spwiv wojje rtyu Notice that it does not replace the space(s) after the Month/Day However, when using this re So, how can I create a replace that removes all spaces after the match and then append replace pattern so it would look like this?: 4/28/2009 hfdkkdi sielsl fidijg. 5/14/2009 fiisollei sikedi jdsildh 6/3/2009 diel dkisl hgiels dhpwld, 6/13/2009 yeus spwiv wojje rtyu Thanks Jeff in Seattle
  3. Hi I am currently using Apache login through files httpd.conf and .htaccess, and setting users and password through command htpasswd. I am not sure how to go about it, but I want: [*]Flush the current user logged in (i.e., logout) [*]Force the Apache's login to re-activate Is there something special I have to do within <Directory> or .htaccess to force login everytime I bring up the URL? Could it be done in PHP? Thanks Jeff in Seattle
  4. Hi I am currently using Apache login through files httpd.conf and .htaccess, and setting users and password through command htpasswd. Is there a way to refresh a page in PHP that will: [*]Flush the current user logged in (i.e., logout) [*]Force the Apache's login to re-activate Is there something special I have to do within <Directory> or .htaccess to force login everytime I bring up the URL? Thanks Jeff in Seattle
  5. Hi In PHP, can I create an XML document in memory (not read into memory from a physical XML file), and then query it in memory using XQuery? I know I can do in C#. I am just curious if I can do it in PHP. Thanks Jeff in Seattle
  6. Hi I read the following useful article on using XML in MySQL: http://dev.mysql.com/tech-resources/articles/xml-in-mysql5.1-6.0.html Does there exist PHP (version 5.2+) coding examples working with MySQL 5.1 using XML data? If not, then is there a PHP module would be recommendable for this request? I am looking for an open source solution, as opposed to a commercial solution. Thanks Jeff in Seattle
  7. If I were to use XQuery and storing XML data in MySQL 5.1, and using PHP version 5.2+, what recommended open source solution (e.g., XQuery_Lite) should I use for a XML data-driven web publishing? I looked at the commercial DataDirect, and it looks interesting, but I am not given the budget. Thanks Jeff in Seattle
  8. Hi My career has primarily been a backend (file, network, and kernel, C++) and middle-tier (transactions, stored procedures, java, PHP) developer. However, on occasions, I am asked to develop a presentation layer solution. For small Intranet deliverables, I have been able to get away in whipping up a data-driven site by using PHP + MySQL/MS-SQL. But, I want to broaden my craft as a programmer, and I want to understand what rule-of-thumb I should follow to choose between: [*]PHP + MySQL functions(): Synchronous Query by direct connection to DB [*]XQuery [*]AJAX - Asynchronous Query by indirect connection to DB I know that I can perform all the basic data-access control operations (e.g., navigation, aggregation, filtering) by synchronous queries by direct connection to a DB (using SELECT, INSERT, DELETE, stored procedures, etc...). But when should I consider the other two? I have not any discussion on the Net that clarifies this question, or am I total confused trying to compare apples to oranges? Thanks for the help, Jeff in Seattle
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.