Jump to content

Pesho

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

Everything posted by Pesho

  1. I don't have my own SMTP address, but one I wrote up there (smtp.googlemail.com) is supposed to be valid. However it doesn't work. How can I see what's wrong...
  2. all right, I guess I don't want it so complicated, I just want to send an e-mail, but I don't know what SMTP to use. ok, I changed the php.ini file with: [mail function] ; For Win32 only. SMTP = smtp.googlemail.com smtp_port = 465 and added the following to my .php script: $to = 'myname@googlemail.com'; $subject = 'subject'; $message = 'messagesssss'; $headers = 'From: myname@googlemail.com' . "\r\n" . 'Reply-To: myname@googlemail.com' . "\r\n"; mail($to, $subject, $message, $headers); However, it doesn't seem to work. It just gets stuck...
  3. I mean the google SMTP address, with my account details (user and pass).
  4. Dear all, could someone tell me how I can send mail through a php script, using my googlemail account... thanks, Petar
  5. thank you! actually the file was test.php.txt, grrrrrrr. Best, pesho
  6. Hi all, I get the following error when trying to run a test.php file: Not Found The requested URL /test.php was not found on this server. the test.php file is in the htdocs directory in apache. I have PHP 5 installed and I've added the following to the httpd.conf file: DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" PHPIniDir "C:\\Program Files\\PHP\\" LoadModule php5_module "C:\\Program Files\\PHP\\php5apache2_2.dll" AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps Why doesn't it find the file test.php? Any suggestion will be highly appreciated. Best, Pesho
  7. I just saw I've got a typing mistake in the second code box. It should be 'metadata' instead of 'dc:creator' sorry for that
  8. hi all, I have to extract information from a DOM representation. My XML content is: <record> <header> <identifier>oai:ub.rug.nl:dbi/4357aa6e091c0</identifier> <datestamp>2006-07-26T21:01:29Z</datestamp> <setSpec>archive-58</setSpec> </header> <metadata> <oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"> <dc:title>Just take her seriously</dc:title> <dc:creator>Weijmar Schultz, W.C.M.</dc:creator> <dc:publisher>Rijksuniversiteit Groningen</dc:publisher> <dc:date>2005-01-01</dc:date> <dc:type>Inaugural lecture</dc:type> <dc:format>text/html</dc:format> <dc:format>application/pdf</dc:format> <dc:identifier>http://irs.ub.rug.nl/ppn/271588403</dc:identifier> <dc:language>nl_NL</dc:language> <dc:relation>http://www.rug.nl/</dc:relation> <dc:rights>Rijksuniversiteit Groningen</dc:rights> </oai_dc:dc> </metadata> </record> first I try to extract information about the <metadata> tag: $records = $dom->documentElement->getElementsByTagName('dc:creator'); foreach($records as $record) { $children = $record->childNodes; foreach($children as $child) { echo $child->nodeName; } } It works fine and the output is: #textoai_dc:dc#text However, when I try the same code for the <dc:creator> tag, the otput is empty! I also tried: $records = $dom->documentElement->getElementsByTagName('dc:creator'); foreach($records as $record) { echo $record->nodeName; } ...and the output was emtpy again ! ? ! ? I'm totally confused why it doesn't return any information about the <dc:creator> tag. Thanks in advance Pesho
  9. Hi all, I'm trying to load a xml content string into a DOM object, using PHP5. the string could be found here: http://ir.ub.rug.nl/oai/?verb=ListRecords&metadataPrefix=oai_dc my code is the following: $dom = new DomDocument(); $dom->loadXML($xml_content); print $dom->save('newfile.xml'); The output file contains only one line - "<?xml version="1.0"?>" Here are the warnings I receive: Warning: DOMDocument::loadXML() [function.loadXML]: XML declaration allowed only at the start of the document in Entity, line: 1 in C:\PHP\www\GuidedResearchProject\formatConversion.php on line 41 Warning: DOMDocument::loadXML() [function.loadXML]: XML declaration allowed only at the start of the document in Entity, line: 1387 in C:\PHP\www\GuidedResearchProject\formatConversion.php on line 41 Warning: DOMDocument::loadXML() [function.loadXML]: XML declaration allowed only at the start of the document in Entity, line: 2887 in C:\PHP\www\GuidedResearchProject\formatConversion.php on line 41 Warning: DOMDocument::loadXML() [function.loadXML]: XML declaration allowed only at the start of the document in Entity, line: 4325 in C:\PHP\www\GuidedResearchProject\formatConversion.php on line 41 22 thanks in advance, Pesho
  10. yep, maybe that's impossible to do.... best, Pesho
  11. hi all, I'm using the XPath engine of MySQL 5.1 and I have the following XML structure: <a> <b>1</b> <c>2</c> <d>3</d> </a> What I want to extract is the tag name of the first child of <a>, e.g. I want to extract the value "b". I know I can access the <b> node as follows: SELECT EXTRACTVALUE(columnName,'/a/child::*[1]') from tableName; This gives me the fist child's text, e.g. "1", but I can't figure out how to get its tag name. I would be extremely grateful for any hint you could give! Regards, Pesho
  12. hi all! I'm trying to get the xml content of a repository with the following URL: http://ir.ub.rug.nl/oai/?verb=ListRecords&metadataPrefix=oai_dc However file_get_contents("http://ir.ub.rug.nl/oai/?verb=ListRecords&metadataPrefix=oai_dc") returns only the text content of the xml tags. I need the whole xml structure untouched. how can I obtain it? Thanks, Pesho
  13. Hi all, For my project I have to use the new MySQL 5 built-in XPath Support. However, I've come across the following problem: Sometimes XML documents have several tags of the same type. For example: <book> <author>a1</author> <author>a2</author> <author>a3</author> <book> to query for the authors I use: select ExtractValue(column_name, 'book/author') from table_name; it returns all the authors, separated with white space as follows: a1 a2 a3 This is pretty inconvenient for parsing if a single author has two names. So, do you know any way to make MySQL return the result with any other separator string, except for white space. Or maybe any other approach to extract the different authors using PHP??? I'd be very grateful if you can help!!! Regards, Pesho
  14. Found the problem Thanks again!
  15. Hello and thanks for the replies. Maybe I'm wrong applying what you told me, but it doesn't work. What I did is add in my .css file: .background { background: transparent url(pattern.jpg) repeat fixed top left; background-attachment: fixed; } and then writing the table code as follows: <table width="770" border="0" align="center" cellpadding="10" cellspacing="0" class="background"> I guess I make a stupid mistake. 10q, Pesho
  16. Hi all, Can somebody tell me how I can set some pattern as a static background, e.g. the background should not move up and down as I scroll the page. Only the page content should move. Also could you tell me how I can set a small image to appear numerous times and thus form the background? 10q, Regards, Pesho
  17. Hi all, I just can't figure out why my table width doesn't change no matter what width parameter I set. I fill the second column with long text info and its right part is displayed a bit trimmed. I tried to reduce the width of the table but didn't succeed. I'm not good at HTML, so I'd be very grateful if you suggest which attribute to change... here is my code: [code] <?php include("mysql_connect.php"); include("header.php"); ?> <br> <h3>Quote Repository</h3> <p> <table width="300" align="LEFT" border="1" cellspacing="0" cellpadding="2"> <?php $query = "SELECT * FROM AnnieQuotes WHERE 1"; $result = mysql_query($query); if(!$result) { echo "Sorry, no quotes available."; } else { echo ' <tr> <td>User:</td> <td>Quote:</td> </tr> '; while($array = mysql_fetch_row($result)) { echo ' <tr> <td>'.$array[1].'</td> <td>'.$array[2].'</td> </tr> '; } } ?> </table> </p> <?php include("footer.php"); ?> [/code]
  18. Hi all, I'm now trying to implement a mysql-backed web site for online appointments for different types of services. However the available slots shown to the users should change whenever somebody books an appointment (because different types of services take different amount of time). For example the initial combo box would show: 9:00 9:30 10:00 10:30 ... and whenever somebody books an appointment for a [b]50-min. service at 9:00[/b] the schedule should be shifted 50 mins in time as follows: 9:00 9:50    //9:00 + 50min for the booked appointment 10:20  //9:50 + 30min 10:50  //10:50 + 30min ... Is there any way for easy handling of time varialbles in php, I mean adding minutes to a variable... Or can you suggest a way to nicely implement this time shift after somebody books an appointment? Thanks in advance, Pesho
×
×
  • 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.