[PHP] XML Get Value of Node DOMXPath
Hello all, Need help to get the value of the node. We know how to get the value of the city , item and itemPrice nodes below. How do we get the value of NumberOfRooms? $hotelElements = $xpath->query( '', $searchReponseElement ); foreach( $hotelElements as $hotelElement ) { $city = $xpath->query( 'City' , $hotelElement ); $item = $xpath->query( 'Item' , $hotelElement ); $itemPrice = $xpath->query( 'ItemPrice' , $hotelElement ); $confirmation = $xpath->query( 'Confirmation' , $hotelElement ); } Here is an example of the XML Response: 4 Thanks -- View this message in context: http://www.nabble.com/XML-Get-Value-of-Node-DOMXPath-tp21015877p21015877.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Image Resizing
Hi all, What is the best way in PHP to Resize an Image to a specific width. For Example I have images in the following sizes: (1) 200px width and 350px height (2) 125px width and 220px height (3) 166px width and 455px height I want all the images to resize to 100px width but the height adjusts automatically. Regards, Stephen -- View this message in context: http://www.nabble.com/Image-Resizing-tp21108753p21108753.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Online Members
Hi all, What is the best way to pick up all the members online on a website? Regards, Stephen -- View this message in context: http://www.nabble.com/Online-Members-tp21180855p21180855.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Posting Data?
Hi all, I have my own register system and I want to Post my values from my register system and post those values into the punbb register form. I do not want to register my values from the punbb form but rather from my login system. How would i be able to do this? Below is the example of the punbb register form: http://www.punbb.co.za/Forums/register.php?action=register";> Username (Required) Between 2 and 25 characters. Password (Required) Minimum 4 characters. Case sensitive. Confirm password (Required) Re-enter your password exactly as before. E-mail (Required) A current valid e-mail address. Your timezone (UTC-12:00) International Date Line West (UTC-11:00) Niue, Samoa (UTC-10:00) Hawaii-Aleutian, Cook Island (UTC-09:30) Marquesas Islands (UTC-09:00) Alaska, Gambier Island (UTC-08:00) Pacific (UTC-07:00) Mountain (UTC-06:00) Central (UTC-05:00) Eastern (UTC-04:00) Atlantic (UTC-03:30) Newfoundland (UTC-03:00) Amazon, Central Greenland (UTC-02:00) Mid-Atlantic (UTC-01:00) Azores, Cape Verde, Eastern Greenland (UTC) Western European, Greenwich (UTC+01:00) Central European, West African (UTC+02:00) Eastern European, Central African (UTC+03:00) Moscow, Eastern African (UTC+03:30) Iran (UTC+04:00) Gulf, Samara (UTC+04:30) Afghanistan (UTC+05:00) Pakistan, Yekaterinburg (UTC+05:30) India, Sri Lanka (UTC+05:45) Nepal (UTC+06:00) Bangladesh, Bhutan, Novosibirsk (UTC+06:30) Cocos Islands, Myanmar (UTC+07:00) Indochina, Krasnoyarsk (UTC+08:00) Greater China, Australian Western, Irkutsk (UTC+08:45) Southeastern Western Australia (UTC+09:00) Japan, Korea, Chita (UTC+09:30) Australian Central (UTC+10:00) Australian Eastern, Vladivostok (UTC+10:30) Lord Howe (UTC+11:00) Solomon Island, Magadan (UTC+11:30) Norfolk Island (UTC+12:00) New Zealand, Fiji, Kamchatka (UTC+12:45) Chatham Islands (UTC+13:00) Tonga, Pho
[PHP] Posting Data?
Hi all, I have my own register system and I want to Post my values from my register system and post those values into the punbb register form. I do not want to register my values from the punbb form but rather from my login system. How would i be able to do this? Below is the example of the punbb register form: http://www.punbb.co.za/Forums/register.php?action=register";> Username (Required) Between 2 and 25 characters. Password (Required) Minimum 4 characters. Case sensitive. Confirm password (Required) Re-enter your password exactly as before. E-mail (Required) A current valid e-mail address. Your timezone (UTC-12:00) International Date Line West (UTC-11:00) Niue, Samoa (UTC-10:00) Hawaii-Aleutian, Cook Island (UTC-09:30) Marquesas Islands (UTC-09:00) Alaska, Gambier Island (UTC-08:00) Pacific (UTC-07:00) Mountain (UTC-06:00) Central (UTC-05:00) Eastern (UTC-04:00) Atlantic (UTC-03:30) Newfoundland (UTC-03:00) Amazon, Central Greenland (UTC-02:00) Mid-Atlantic (UTC-01:00) Azores, Cape Verde, Eastern Greenland (UTC) Western European, Greenwich (UTC+01:00) Central European, West African (UTC+02:00) Eastern European, Central African (UTC+03:00) Moscow, Eastern African (UTC+03:30) Iran (UTC+04:00) Gulf, Samara (UTC+04:30) Afghanistan (UTC+05:00) Pakistan, Yekaterinburg (UTC+05:30) India, Sri Lanka (UTC+05:45) Nepal (UTC+06:00) Bangladesh, Bhutan, Novosibirsk (UTC+06:30) Cocos Islands, Myanmar (UTC+07:00) Indochina, Krasnoyarsk (UTC+08:00) Greater China, Australian Western, Irkutsk (UTC+08:45) Southeastern Western Australia (UTC+09:00) Japan, Korea, Chita (UTC+09:30) Australian Central (UTC+10:00) Australian Eastern, Vladivostok (UTC+10:30) Lord Howe (UTC+11:00) Solomon Island, Magadan (UTC+11:30) Norfolk Island (UTC+12:00) New Zealand, Fiji, Kamchatka (UTC+12:45) Chatham Islands (UTC+13:00) Tonga, Pho
[PHP] Captha Image Matching the Session Value.
Hi all, My captha code is working but the session code is not matching image code(captha code). How do i get them to match each other. PHP CAPTHA session_start(); $fontArray = array('arial.tff' , 'impact.tff' , 'tahoma.tff' , 'tunga.tff' , 'verdana.tff'); $fontOne = md5(rand(0,50)); $fontTwo = md5(rand(0,50)); $fontThree = md5(rand(0,50)); $fontFour = md5(rand(0,50)); //Let's generate a totally random string using md5 $md5_hashOne = md5(rand(0,999)); $md5_hashTwo = md5(rand(0,999)); $md5_hashThree = md5(rand(0,999)); $md5_hashFour = md5(rand(0,999)); //We don't need a 32 character long string so we trim it down to 5 $wordOne = substr($md5_hashOne, 15, 1); $wordTwo = substr($md5_hashTwo, 15, 1); $wordThree = substr($md5_hashThree, 15, 1); $wordFour = substr($md5_hashFour, 15, 1); //Set the image width and height $width = 400; $height = 150; //Create the image resource $image = @imagecreatefromjpeg("CapthaBack.jpg"); $grey = imagecolorallocate($image, 255, 255, 255); imagettftext($image,20, rand(0,70), 30, 30, $grey , 'impact.ttf' , $wordOne); imagettftext($image,20, rand(0,70), 70, 30, $grey , 'impact.ttf' , $wordTwo); imagettftext($image,20, rand(0,70), 110, 30, $grey , 'impact.ttf' , $wordThree); imagettftext($image,20, rand(0,70), 150, 30, $grey , 'impact.ttf' , $wordFour); session_unset($_SESSION["security_code"]); $_SESSION["security_code"] = $wordOne . "" . $wordTwo . "" . $wordThree . "" . $wordFour; header("Content-Type: image/jpeg"); //Output the newly created image in jpeg format ImageJpeg($image); //Free up resources ImageDestroy($image); HTML CODE session_start(); Thanks, Stephen -- View this message in context: http://www.nabble.com/Captha-Image-Matching-the-Session-Value.-tp21650616p21650616.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Captha Image Matching the Session Value.
Hi ash, Thanks for your reply but the image does change when i refresh the page but the session value is one before the image value. If this is a cache problem how would i prevent this? Thanks, Stephen -- View this message in context: http://www.nabble.com/Captha-Image-Matching-the-Session-Value.-tp21650616p21650839.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Captha Image Matching the Session Value.
Hey Richard, Thanks for your reply but the Captcha php code is a seperate file to the html code but the code is working but the values are not matching. Thanks, Stephen -- View this message in context: http://www.nabble.com/Captha-Image-Matching-the-Session-Value.-tp21650616p21651034.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Captha Image Matching the Session Value.
Hey Ash, Is I have but the Session Value is one before the Captha Image Value. Regards, Stephen -- View this message in context: http://www.nabble.com/Captha-Image-Matching-the-Session-Value.-tp21650616p21651258.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Simple XML in PHP
HI all, How would a get this video from XML. /***Example i want to View***/ http://video-cdn.abcnews.com/090324_gma_leamy.flv"; lang="en" width="424" height="318" type="video/x-flv" /> /**/ /**XML CODE***/ Investigating Toxic Drywall http://feedproxy.google.com/~r/AbcNews_Health_Videos/~3/d5ewEbco-js/playerIndex China-made drywall could be leaching noxious gases into homes.Tue, 24 Mar 2009 10:20:04 -0400 Tue, 24 Mar 2009 10:20:04 -0400 Investigating Toxic Drywall China-made drywall could be leaching noxious gases into homes. drwall, toxic, china, building, house, health nonadult http://a.abcnews.com/images/GMA/abc_gma_leamy_090324_mn.jpg"; width="320" height="240" /> http://a.abcnews.com/images/GMA/abc_gma_leamy_090324_mc.jpg"; width="100" height="75" /> http://a.abcnews.com/images/GMA/abc_gma_leamy_090324_mv.jpg"; width="264" height="198" /> http://video-cdn.abcnews.com/090324_gma_leamy.flv"; lang="en" width="424" height="318" type="video/x-flv" /> Health /*PHP CODE EXAMPLE**/ $cnt = count($xml->channel->item); for($i=0; $i<$cnt; $i++) { $url= $xml->channel->item[$i]->link; $title = $xml->channel->item[$i]->title; $desc = $xml->channel->item[$i]->description; $pubDate = $xml->channel->item[$i]->pubDate; echo ' '.$url.' '.$title.' '; echo ""; echo $desc; echo ""; echo $pubDate; echo ""; echo ""; } -- View this message in context: http://www.nabble.com/Simple-XML-in-PHP-tp22690831p22690831.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php