drisate
Members-
Posts
805 -
Joined
-
Last visited
Everything posted by drisate
-
yeah it's for an auto payment from my website using a gateway prosessor direcly to my member. Long storry hehe. Thx, let me investigate curl
-
hey guys. i need to make a php script that will open a webpage, insert data into a form submit the data, open a link, analyse the data of the page. I know that not impossible to do ... but i don't know where to start. can somebody point me in the right direction?
-
Bingo ... sorry found how if ($_POST[quantity]!=""){ foreach ($_POST['quantity'] as $item_id => $attributes) { foreach ($_POST['quantity'][$item_id] as $attributes => $quantity) { $item_id = strip_tags($item_id); $attributes = strip_tags($attributes); $quantity = strip_tags($quantity); echo "item_id: ".$item_id."<br>"; echo "attributes: ".$attributes."<br>"; echo "quantity: ".$quantity."<br>"; } } }
-
Hey guys, I have a form with a input that looks like this value="1" name="quantity[38][none]" I need to retreve the value 1 and the [38] ... I found how to get the 1. this is what i am doing at the moment: if ($_POST[quantity]!=""){ foreach ($_POST[quantity] as $value){ foreach ($value as $values){ echo $values."<br>"; }}} But i also need to get the [38] value into a var to be able to make my update. 38 is the unique id i need to identify the row to update to 1.
-
OMG! ... thats a lot better ! I really need to get a hang on regex ...
-
I found a way $string=str_replace("\n", '*', str_replace("\r", '', $string)); $string=str_replace('* ', '*', $string); $string=str_replace(' * ', '*', $string); $string=str_replace('->', '&', $string); $string=str_replace(' & ', '&', $string); $row = explode ('*+*', $string); foreach ($row as $therow){ $inrow = explode ('*', $therow); $i=1; foreach ($inrow as $newrow){ if ($i=="1"){ $country=$newrow; echo "<br>$country<br>"; }else{ $code_location = explode('%', $newrow); foreach($code_location as $last){ $codes = explode('&', $last); $code=$codes[0]; $location=$codes[1]; echo "$code -> $location<br>"; } } $i++; } } But don't you have the feeling this is the worst way of doing this? ... i do ...
-
I managed to get this code working string = "-Albania LATI -> Tirana + -Angola FNLU -> Luanda + -Antarctic NZCM -> Williams Field + -Antigua and Barbuda TAPA -> Vc Bird International Airport Antigua + -Algeria DAUA -> Adrar DABB -> Annaba DABC -> Constantine DAAG -> Dar-El-Beida DAUG -> Ghardaia DAUH -> Hassi-Messaoud DAUZ -> In Amenas DAOO -> Oran / Es Senia DAAT -> Tamanrasset / Aguenna DABS -> Tebessa DAON -> Tlemcen Zenata + -Argentina SABE -> Aeroparque Bs. As. Aerodrome SAZB -> Bahia Blanca Aerodrome SAZS -> Bariloche Aerodrome SAVC -> Comodoro Rivadavia Aerodrome SAAC -> Concordia Aerodrome SACO -> Cordoba Aerodrome SARC -> Corrientes Aero. SADD -> Don Torcuato Aerodrome SAEZ -> Ezeiza Aerodrome SARF -> Formosa Aerodrome SARI -> Iguazu Aerodrome SASJ -> Jujuy Aerodrome SAZM -> Mar Del Plata Aerodrome SAME -> Mendoza Aerodrome SAZN -> Neuquen Aerodrome SARL -> Paso De Los Libres Aerodrome SARP -> Posadas Aero. SARE -> Resistencia Aero. SAWG -> Rio Gallegos Aerodrome SAWE -> Rio Grande B. A. SAAR -> Rosario Aerodrome SASA -> Salta Aerodrome SANU -> San Juan Aerodrome SANE -> Santiago Del Estero Aero. SAAV -> Sauce Viejo Aerodrome SAVT -> Trelew Aerodrome SANT -> Tucuman Aerodrome SAOR -> Villa Reynolds Aerodrome + -Armenia UGEE -> Yerevan + -Aruba TNCA -> Queen Beatrix Airport, Aruba + -Australia YPAD -> Adelaide Airport YBAS -> Alice Springs Aerodrome YPPH -> Belmont Perth Airport YBBN -> Brisbane Airport M. O YBRM -> Broome Airport YPEA -> Bullsbrook Pearce Amo YBCS -> Cairns Airport YSCB -> Canberra YPDN -> Darwin Airport YSDU -> Dubbo YMHB -> Hobart Airport YPTN -> Katherine Aerodrome YPLM -> Learmonth Airport YMML -> Melbourne Airport YSNF -> Norfolk Island Airport YPPD -> Port Hedland Pardoo YSRI -> Richmond Aus-Afb YBRK -> Rockhampton Airport YSSY -> Sydney Airport YBTL -> Townsville Amo + -Austria LOWG -> Graz-Thalerhof-Flughafen LOWI -> Innsbruck-Flughafen LOWK -> Klagenfurt-Flughafen LOWL -> Linz / Hoersching-Flughafen LOWS -> Salzburg-Flughafen LOWW -> Wien / Schwechat-Flughafen + -Azerbaijan UBBB -> Baku / Bine Airport + -Bahamas MYGF -> Freeport, Grand Bahama MYNN -> Nassau Airport + -Bahrain OBBI -> Bahrain International Airport + -Bangladesh VGEG -> Chittagong Patenga VGZR -> Kurmitola, Dia + -Barbados TBPB -> Grantley Adams + -Belarus UMMS -> Minsk EVRA -> Riga Airport UMII -> Vitebsk + -Belgium EBAW -> Antwerpen / Deurne EBBE -> Beauvechain EBLG -> Bierset EBBT -> Brasschaat EBBR -> Bruxelles National EBCI -> Charleroi / Gosselies EBCV -> Chievres EBLB -> Elsenborn EBFS -> Florennes EBTN -> Goetsenhoven EBBL -> Kleine Brogel EBFN -> Koksijde EBOS -> Oostende Airport EBDT -> Schaffen EBSP -> Spa / La Sauveniere + -Belize MZBZ -> Belize / Phillip Goldston Intl. Airport + -Benin DBBB -> Cotonou + -Bermuda TXKF -> Bermuda +"; $string=str_replace("\n", '*', str_replace("\r", '', $string)); $string=str_replace('* ', '*', $string); $string=str_replace(' * ', '*', $string); $string=str_replace('*+*', '%', $string); $string=str_replace('->', '&', $string); $string=str_replace(' & ', '&', $string); // The above outputs a string that looks like this in 1 line /*-Albania*LATI&Tirana%-Angola*FNLU&Luanda%-Antarctic*NZCM&Williams Field%-Antigua and Barbuda*TAPA&Vc Bird International Airport Antigua%-Algeria*DAUA&Adrar*DABB&Annaba*DABC&Constantine*DAAG&Dar-El-Beida*DAUG&Ghardaia*DAUH&Hassi-Messaoud*DAUZ&In Amenas*DAOO&Oran / Es Senia*DAAT&Tamanrasset / Aguenna*DABS&Tebessa*DAON&Tlemcen Zenata %-Argentina*SABE&Aeroparque Bs. As. Aerodrome*SAZB&Bahia Blanca Aerodrome*SAZS&Bariloche Aerodrome*SAVC&Comodoro Rivadavia Aerodrome*SAAC&Concordia Aerodrome*SACO&Cordoba Aerodrome*SARC&Corrientes Aero.*SADD&Don Torcuato Aerodrome*SAEZ&Ezeiza Aerodrome*SARF&Formosa Aerodrome*SARI&Iguazu Aerodrome*SASJ&Jujuy Aerodrome*SAZM&Mar Del Plata Aerodrome*SAME&Mendoza Aerodrome*SAZN&Neuquen Aerodrome*SARL&Paso De Los Libres Aerodrome*SARP&Posadas Aero.*SARE&Resistencia Aero.*SAWG&Rio Gallegos Aerodrome*SAWE&Rio Grande B. A.*SAAR&Rosario Aerodrome*SASA&Salta Aerodrome*SANU&San Juan Aerodrome*SANE&Santiago Del Estero Aero.*SAAV&Sauce Viejo Aerodrome*SAVT&Trelew Aerodrome*SANT&Tucuman Aerodrome*SAOR&Villa Reynolds Aerodrome%-Armenia*UGEE&Yerevan%-Aruba*TNCA&Queen Beatrix Airport, Aruba%-Australia*YPAD&Adelaide Airport*YBAS&Alice Springs Aerodrome*YPPH&Belmont Perth Airport *YBBN&Brisbane Airport M. O*YBRM&Broome Airport*YPEA&Bullsbrook Pearce Amo*YBCS&Cairns Airport*YSCB&Canberra*YPDN&Darwin Airport*YSDU&Dubbo*YMHB&Hobart Airport*YPTN&Katherine Aerodrome*YPLM&Learmonth Airport*YMML&Melbourne Airport*YSNF&Norfolk Island Airport*YPPD&Port Hedland Pardoo*YSRI&Richmond Aus-Afb *YBRK&Rockhampton Airport*YSSY&Sydney Airport*YBTL&Townsville Amo%-Austria*LOWG&Graz-Thalerhof-Flughafen*LOWI&Innsbruck-Flughafen*LOWK&Klagenfurt-Flughafen*LOWL&Linz / Hoersching-Flughafen*LOWS&Salzburg-Flughafen*LOWW&Wien / Schwechat-Flughafen%-Azerbaijan*UBBB&Baku / Bine Airport%-Bahamas*MYGF&Freeport, Grand Bahama*MYNN&Nassau Airport%-Bahrain*OBBI&Bahrain International Airport %-Bangladesh*VGEG&Chittagong Patenga *VGZR&Kurmitola, Dia%-Barbados*TBPB&Grantley Adams%-Belarus*UMMS&Minsk*EVRA&Riga Airport*UMII&Vitebsk%-Belgium*EBAW&Antwerpen / Deurne*EBBE&Beauvechain*EBLG&Bierset*EBBT&Brasschaat*EBBR&Bruxelles National*EBCI&Charleroi / Gosselies*EBCV&Chievres*EBLB&Elsenborn*EBFS&Florennes*EBTN&Goetsenhoven*EBBL&Kleine Brogel*EBFN&Koksijde*EBOS&Oostende Airport *EBDT&Schaffen*EBSP&Spa / La Sauveniere%-Belize*MZBZ&Belize / Phillip Goldston Intl. Airport%-Benin*DBBB&Cotonou%-Bermuda*TXKF&Bermuda%*/ $row = explode ('-', $string); foreach ($row as $therow){ $inrow = explode ('*', $therow); $i=1; foreach ($inrow as $newrow){ if ($i=="1"){ $country=$newrow; echo "<br>$country<br>"; }else{ $code_location = explode('%', $newrow); foreach($code_location as $last){ $codes = explode('&', $last); $code=$codes[0]; $location=$codes[1]; echo "$code -> $location<br>"; } } $i++; } } now the only problem i have is with the - loop because some location names contains some so it breaks the loop ... thats why i thought it would be good to use soem regex instead.
-
Are you using any PHP code to display the result bro?
-
I was trying doing it with explodes and loops ... but my code was gething rediculous ... $row=explode('+', $string); foreach($row as $value){ $country=explode('\n', $value); $co=str_replace('-', '', $country[0]); $cut=explode('->', $country[1]); print ("$co = Country<br> $cut[0]= Code<br> $cut[1]= location"); } But this is obviously not gona work ... then i thought it would be best to use some regex This outputs: http://blessingstairs.org/code.php
-
This could be a firewall issue with your host. Did you try zipping up the wave?
-
Can Anyone Point Me In The Right Direction...?
drisate replied to roldahayes's topic in PHP Coding Help
show us the code you have so fare -
I think we would require more info on your coding to be able to awnser your question. You can ask sombody where to go if you dont start by showing us where you are.
-
Hey guys i have a string that looks like this -Albania LATI -> Tirana + -Angola FNLU -> Luanda + -Antarctic NZCM -> Williams Field + -Antigua and Barbuda TAPA -> Vc Bird International Airport Antigua + -Algeria DAUA -> Adrar DABB -> Annaba DABC -> Constantine DAAG -> Dar-El-Beida DAUG -> Ghardaia DAUH -> Hassi-Messaoud DAUZ -> In Amenas DAOO -> Oran / Es Senia DAAT -> Tamanrasset / Aguenna DABS -> Tebessa DAON -> Tlemcen Zenata + -Argentina SABE -> Aeroparque Bs. As. Aerodrome SAZB -> Bahia Blanca Aerodrome SAZS -> Bariloche Aerodrome SAVC -> Comodoro Rivadavia Aerodrome SAAC -> Concordia Aerodrome SACO -> Cordoba Aerodrome SARC -> Corrientes Aero. SADD -> Don Torcuato Aerodrome SAEZ -> Ezeiza Aerodrome SARF -> Formosa Aerodrome SARI -> Iguazu Aerodrome SASJ -> Jujuy Aerodrome SAZM -> Mar Del Plata Aerodrome SAME -> Mendoza Aerodrome SAZN -> Neuquen Aerodrome SARL -> Paso De Los Libres Aerodrome SARP -> Posadas Aero. SARE -> Resistencia Aero. SAWG -> Rio Gallegos Aerodrome SAWE -> Rio Grande B. A. SAAR -> Rosario Aerodrome SASA -> Salta Aerodrome SANU -> San Juan Aerodrome SANE -> Santiago Del Estero Aero. SAAV -> Sauce Viejo Aerodrome SAVT -> Trelew Aerodrome SANT -> Tucuman Aerodrome SAOR -> Villa Reynolds Aerodrome + -Armenia UGEE -> Yerevan + -Aruba TNCA -> Queen Beatrix Airport, Aruba + -Australia YPAD -> Adelaide Airport YBAS -> Alice Springs Aerodrome YPPH -> Belmont Perth Airport YBBN -> Brisbane Airport M. O YBRM -> Broome Airport YPEA -> Bullsbrook Pearce Amo YBCS -> Cairns Airport YSCB -> Canberra YPDN -> Darwin Airport YSDU -> Dubbo YMHB -> Hobart Airport YPTN -> Katherine Aerodrome YPLM -> Learmonth Airport YMML -> Melbourne Airport YSNF -> Norfolk Island Airport YPPD -> Port Hedland Pardoo YSRI -> Richmond Aus-Afb YBRK -> Rockhampton Airport YSSY -> Sydney Airport YBTL -> Townsville Amo + -Austria LOWG -> Graz-Thalerhof-Flughafen LOWI -> Innsbruck-Flughafen LOWK -> Klagenfurt-Flughafen LOWL -> Linz / Hoersching-Flughafen LOWS -> Salzburg-Flughafen LOWW -> Wien / Schwechat-Flughafen + -Azerbaijan UBBB -> Baku / Bine Airport + -Bahamas MYGF -> Freeport, Grand Bahama MYNN -> Nassau Airport + -Bahrain OBBI -> Bahrain International Airport + -Bangladesh VGEG -> Chittagong Patenga VGZR -> Kurmitola, Dia + -Barbados TBPB -> Grantley Adams + -Belarus UMMS -> Minsk EVRA -> Riga Airport UMII -> Vitebsk + -Belgium EBAW -> Antwerpen / Deurne EBBE -> Beauvechain EBLG -> Bierset EBBT -> Brasschaat EBBR -> Bruxelles National EBCI -> Charleroi / Gosselies EBCV -> Chievres EBLB -> Elsenborn EBFS -> Florennes EBTN -> Goetsenhoven EBBL -> Kleine Brogel EBFN -> Koksijde EBOS -> Oostende Airport EBDT -> Schaffen EBSP -> Spa / La Sauveniere + -Belize MZBZ -> Belize / Phillip Goldston Intl. Airport + -Benin DBBB -> Cotonou + -Bermuda TXKF -> Bermuda + -Bolivia SLCA -> Camiri SLCN -> Charana SLCO -> Cobija SLCB -> Cochabamba SLCP -> Concepcion SLLP -> La Paz / Alto SLMG -> Magdalena SLOR -> Oruro SLPO -> Potosi SLPS -> Puerto Suarez SLRY -> Reyes SLRI -> Riberalta SLRB -> Robore SLRQ -> Rurrenabaque SLSI -> San Ignacio De Velasco SLJO -> San Joaquin SLJE -> San Jose De Chiquitos SLSA -> Santa Ana SLSU -> Sucre SLTJ -> Tarija SLTR -> Trinidad SLVM -> Villamontes SLVR -> Viru-Viru SLYA -> Yacuiba + -Botswana FBFT -> Francistown FBGZ -> Ghanzi FBJW -> Jwaneng FBKE -> Kasane FBMN -> Maun FBSK -> Seretse Khama International Airport FBSW -> Shakawe FBTS -> Tsabong FBTE -> Tshane + -Brazil SBAF -> Afonsos Aeroporto SBAT -> Alta Floresta Aeroporto SBHT -> Altamira SBAR -> Aracaju Aeroporto SBBG -> Bage Aeroporto SBBU -> Bauru SBBE -> Belem Aeroporto SBCF -> Belo Horizonte SBBH -> Belo Horizonte Aeroporto SBBV -> Boa Vista Aeropor-To SBBR -> Brasilia Aeroporto SBKG -> Campina Grande SBKP -> Campinas Aeroporto SBCG -> Campo Grande Aeroporto SBCV -> Caravelas Aeropor-To SBAA -> Conceicao Do Araguaia SBCR -> Corumba SBCY -> Cuiaba Aeroporto SBBI -> Curitiba SBCT -> Curitiba Aeroporto SBEG -> Eduardo Gomes International SBFN -> Fernando De Noronha SBFL -> Florianopolis Aeroporto SBFZ -> Fortaleza Aeropor-To SBFI -> Foz Do Iguacu Aeroporto SBGL -> Galeao SBGO -> Goiania Aeroporto SBGW -> Guaratingueta SBGR -> Guarulhos Civ / Mil SBIL -> Ilheus Aeroporto SBIZ -> Imperatriz SBIH -> Itaituba SBLO -> Londrina Aeroporto SBME -> Macae SBMQ -> Macapa SBMO -> Maceio Aeroporto SBMN -> Manaus Aeroporto SBMA -> Maraba SBMT -> Marte Civ / Mil SBNT -> Natal Aeroporto SBPK -> Pelotas SBYS -> Pirassununga SBPC -> Pocos De Caldas SBPP -> Ponta Pora Aeropor-To SBCO -> Porto Alegre SBPA -> Porto Alegre Aero-Porto SBPN -> Porto Nacional Aeroporto SBPV -> Porto Velho Aeroporto SBDN -> Presidente Prudente SBRF -> Recife Aeroporto SBJR -> Rio / Jacarepagua SBRB -> Rio Branco SBRJ -> Rio De Janeiro Aeroporto SBSV -> Salvador Aeroporto SBSC -> Santa Cruz Aeropor-To SBSM -> Santa Maria Aero-Porto SBSN -> Santarem-Aeroporto SBST -> Santos Aeroporto SBSJ -> Sao Jose Dos Campo SBSL -> Sao Luiz Aeroporto SBSP -> Sao Paulo Aeropor-To SBTT -> Tabatinga SBTF -> Tefe SBTE -> Teresina Aeroporto SBTU -> Tucurui SBUR -> Uberaba SBUG -> Uruguaiana Aeroporto SBVH -> Vilhena Aeroporto SBVT -> Vitoria Aeroporto + -British Indian Ocean Territory FJDG -> Diego Garcia + -Brunei Darussalam WBSB -> Brunei Airport + -Bulgaria LBBG -> Burgas LBPD -> Plovdiv LBSF -> Sofia Observ. LBWN -> Varna + -Burundi HBBA -> Bujumbura + -Cambodia VDPP -> Phnom-Penh / Pochentong + -Cameroon FKKD -> Douala Obs. + -Canada CYXX -> Abbotsford, B. C. CYBG -> Bagotville, Que. CYYC -> Calgary International, Alta. CYCB -> Cambridge Bay, N. W. T. CYCH -> Chatham Can-Mil CZUM -> Churchill Falls, Nfld. CYYQ -> Churchill, Man. CYOD -> Cold Lake, Alta. CYQQ -> Comox, B. C. CYZS -> Coral Harbour, N. W. T. CYEG -> Edmonton International, Alta. CYET -> Edson, Alta. CZFM -> Fort Mcpherson Airport CYFC -> Fredericton, N. B. CYQX -> Gander Int. Airport, Nfld. CYYR -> Goose, Nfld. CYZX -> Greenwood, N. S. CYHZ -> Halifax International Airport CYFB -> Iqaluit, N. W. T. CYAH -> La Grande Iv, Que. CYGL -> La Grande Riviere, Que CYZY -> Mackenzie, B. C. CYNM -> Matagami, Que. CYXH -> Medicine Hat, Alta. CYQM -> Moncton, N. B. CYUL -> Montreal / Dorval International, Que CYMX -> Montreal / Mirabel CYBU -> Nipawin, Sask. CYOC -> Old Crow Airport CYOW -> Ottawa Int'L. Ont. CYYF -> Penticton, B. C. CYZT -> Port Hardy, B. C. CYPG -> Portage Southport A CYQB -> Quebec, Que CYUY -> Rouyn Airport CWZZ -> Saglek Bay CYAY -> Saint Anthony Airport CYZV -> Sept-Iles, Que. CYAW -> Shearwater, N. S. CYUA -> Shingle Point, Y. T. CYYT -> St. John's, Nfld CYJT -> Stephenville, Nfld. CYYN -> Swift Current, Sask. CYQY -> Sydney, N. S. CYTH -> Thompson Weather Office, Man CYYZ -> Toronto Pearson Int'L. Ont. CYTR -> Trenton, Ont. CYVR -> Vancouver International Air-Port, B. C. CYYJ -> Victoria Int. Airportb. C. CYQG -> Windsor, Ont. CYWG -> Winnipeg Int. Airportman. CYZF -> Yellowknife, N. W. T. + -Cape Verde GVAC -> Sal + -Cayman Islands MWCR -> Owen Roberts Airportgrand Cayman + -Central African Republic FEFF -> Bangui + -Chad FTTJ -> Ndjamena + -Chile SCFA -> Antofagasta SCAR -> Arica SCIE -> Concepcion SCHA -> Copiapo SCDA -> Iquique / Diego Arac SCIP -> Isla De Pascua SCSE -> La Serena SCEL -> Pudahuel SCTE -> Puerto Montt SCCI -> Punta Arenas + -China ZBAA -> Beijing ZUUU -> Chengdu ZYTL -> Dalian ZGGG -> Guangzhou ZSHC -> Hangzhou ZSOF -> Hefei ZPPP -> Kunming ZGNN -> Nanning ZSSS -> Shanghai / Hongqiao ZGSZ -> Shenzhen ZBYN -> Taiyuan ZBTJ -> Tianjin / Zhangguizhu ZWWW -> Urum-Qi / Diwopu ZSAM -> Xiamen + -Christmas Island YPXM -> Christmas Island Aerodrome YPCC -> Cocos Island Airport + -Colombia SKBQ -> Barranquilla / Ernestocortissoz SKBO -> Bogota / Eldorado SKBG -> Bucaramanga / Palonegro SKCL -> Cali / Alfonso Bonillaaragon SKCG -> Cartagena / Rafael Nunez SKLT -> Leticia / Vasquez Cobo SKMD -> Medellin / Olaya Herrera SKPE -> Pereira / Matecana SKRG -> Rionegro / J. M. Cordova SKSP -> San Andres Isla / Sesquicentenario SKSM -> Santa Marta / Simon Bolivar + -Comoros FMCZ -> Dzaoudzi / Pamanzi Mayotte FMCH -> Hahaya International Airport + -Congo FCBB -> Brazzaville / Maya-Maya FCPP -> Pointe-Noire + -Cook Islands NCRG -> Rarotonga + -Costa Rica MRCH -> Chacarita MROC -> Juan Santamaria MRLB -> Liberia MRLM -> Puerto Limon MRPV -> Tobias Bolanos International + -Cote D'Ivoire DIAP -> Abidjan + -Croatia LDDU -> Dubrovnik / Cilipi LDPL -> Pula Aerodrome LDRI -> Rijeka / Omisalj LDSP -> Split / Resnik LDZD -> Zadar / Zemunik LDZA -> Zagreb / Pleso + [...] I neet to extrac those values to put them in a DB For every $country i need the $code and $location I think the best way would be exploding the + then a preg_match? If thats the case, can you help my build the regex expression? If it's possible to do it all with regex it would be even better.
-
Hey guys. I am currently working on a weather script and was wandering if it was possible to retrieve the location of the guy and set it as default value. So my question is, if it's possible, how can I get his location?
-
Nope looks like the output is not properly filtred startScroll('last','<p><center><img src='images/ebook/thumbs/999925013129.jpg'></center><br><b> Expert Guide to Article Marketing </b><br>One way of promoting your website and product can be achieved for FREE. As an additional bonus, this “free” method can boost your sites and sales, doubling and even tripling your income. Articles. One of the easiest ways to promote your website in order to generate traffic and increase your earnings.</p>'); startScroll('last','<p><center><img src='images/ebook/thumbs/280149095128.gif'></center><br><b>Warrants: Understanding trading and investment warrants</b><br>Warrants – A new investing alternative, The 1990s saw a dynamic financial market become established in Australia offering concepts that were innovative for private investors. In the past decade characterised by its innovation, the rapidly growing warrants market was at the cutting edge.</p>'); startScroll('last','<p><center><img src='images/ebook/thumbs/794306526127.gif'></center><br><b>The Trading Pro’s Secret: Intermarket Analysis</b><br>The Trading Pro’s Secret: Intermarket Analysis helps you understand why intermarket analysis is essential for trading success and shows you why and how it can be a key tool in your trading toolbox: * Factoring in fundamentals * Understanding historical market correlations * Spotting intermarket relationships * Intermarket indicators for intraday or long-term positions * Using predictive indicators</p>'); startScroll('last','<p><center><img src='images/ebook/thumbs/1190699647126.jpg'></center><br><b>The Intelligent Investor</b><br>Barron's 'The wider Mr. Graham’s gospel spreads, the more fairly the market will deal with its public.' The Intelligent Investor by Benjamin Graham published in 1949, is a widely acclaimed book on investing. Famous investor and billionaire Warren Buffett describes it as 'by far the best book on investing ever written', a sentiment echoed by other Graham disciples such as Irving Kahn and Walter Schloss.</p>'); startScroll('last','<p><center><img src='images/ebook/thumbs/893460251ebook.jpg'></center><br><b>Hope</b><br>Understanding Its Power & Purpose</p>'); startScroll('last','<p><center><img src='images/ebook/thumbs/946039699124.jpg'></center><br><b>God's Promises in ( Key Life Areas</b><br>That Will Change Your Life Forever!</p>'); startScroll('last','<p><center><img src='images/ebook/thumbs/1153930305123.jpg'></center><br><b>You and God - Getting Personal</b><br>'One of the best guides!' - Discover How You Can Develop a Relationship with God and Know Him More Intimately,</p>'); startScroll('last','<p><center><img src='images/ebook/thumbs/624379136121.jpg'></center><br><b>How to Avoid Success at all Costs</b><br>You may be wondering, \'Why would I want to avoid success?\' Most people do this without any effort! And, so begins this new eBook by Pastor Bobby. This is my favorite of his eBooks so far; well, then again, how can you really choose a favorite. So, what is in this book? The focus of this eBook is Christian Business Success! He discusses such topics as: - Teamwork - Mentoring - Potholes to avoid</p>'); startScroll('last','<p><center><img src='images/ebook/thumbs/168727523120.gif'></center><br><b>First Look 2007 Microsoft Office System</b><br>Katherine Murray gives you an exclusive introduction to the next generation of Microsoft Office. Youll get an expert overview of new and enhanced applications, features, and capabilities in addition to advance insights and straight talk from the Office product group. Discover the new user interface and revolutionize the way you use Office; learn about the Live Preview feature; introduce yourself to the new collaboration products and services, including Microsoft Office Live Meeting and Microsoft Office Groove. In addition, learn about enhancements to existing Office applications, including new graphics capabilities in Microsoft Office PowerPoint, easier database creation with Microsoft Office Access, easier time-management capabilities in Microsoft Office Outlook, and improved charting capabilities in Microsoft Office Excel.</p>'); startScroll('last','<p><center><img src='images/ebook/thumbs/35789564119.gif'></center><br><b>E-Mail Rules</b><br>ll companies rely on e-mail as a critical business tool, but few have considered the policies and systems necessary to safeguard their interests. Important information including transaction details, trade secrets, and confidential documents contained within messages are business assets with serious legal and financial implications. If an organization is to be safe, it needs a practical system for handling everything that comes into—and leaves—its computers.</p>'); There should by only 1 line for every startScroll('last',''); this is the PHP code i have at the moment <?php $last_10 = mysql_query("SELECT * FROM bs_prod order by id desc limit 0,10") or die(mysql_error()); while ($l_prod = @mysql_fetch_array($last_10)) { $l_prod[name]=str_replace("'", ''', $l_prod[name]); $l_prod[name]=str_replace('"', ''', $l_prod[name]); $l_prod[description]=trim(str_replace("'", ''', $l_prod[description])); $l_prod[description]=trim(str_replace('"', ''', $l_prod[description])); $l_prod[description]=str_replace("\n", ' ', $l_prod[description]); echo "startScroll('last','<p><center><img src='images/ebook/thumbs/$l_prod[img]'></center><br><b>$l_prod[name]</b><br>$l_prod[description]</p>');\n"; } ?>
-
Hey guys i have a small problem. I am inserting PHP into a Javascript script but the value i am inserting looks like this and it breaks the script. it should looks like this
-
bump Anybody?
-
Hey guys I just downloaded an IP Geolocation class from http://www.phpclasses.org/browse/package/3813.html But when i run the script i get: Fatal error: Call to a member function on a non-object in /home/blesmpm/public_html/site/geolocation/PHP45.XML.php on line 67 I have PHP4 The related lines are: [...] 66. $ch = $ch->next_sibling(); 67. $ch = $ch->children(); 68. 69. $ch = $ch[1]->children(); [...] This is the full script: <?php class PHP45XML { var $doc; function PHP45XML() { # boil down the version information if (version_compare(PHP_VERSION,'5','>=')) define( 'PHP', 5); else define( 'PHP', 4); } function loadXML($xml) { // switch on the version of the PHP interpreter switch( PHP ) { case 4: // create and load the document in the case of php 4 using DOM XML if (!$this->doc = domxml_open_mem($xml)) die("Error while parsing the XML document\n"); break; case 5: // make DOMDocument and load the data $this->doc = new DOMDocument(); $this->doc->loadXML($xml); break; } } // This function uses XPath to parse the result XML file of the hostip.info site function xpath($query) { $result = array(); // switch on the version of the PHP interpreter switch( PHP ) { case 4: $xpath = $this->doc->xpath_new_context(); // doesn't work, $namespace = $xpath->xpath_eval('namespace-uri(//*)'); // returns the namespace uri // we need to use the gml namespace. // TODO: get this out of the document proper and remove magic constant xpath_register_ns($xpath, "gml", 'http://www.opengis.net/gml' ); $obj = xpath_eval_expression($xpath, "//gml:name"); // finds all gml:name tags // start of frustrating XML experience $firstnode = $obj->nodeset[1]; $children = $firstnode->children(); $value = $children[0]->content; $result['city'] = $value; $ch = $firstnode->next_sibling(); $ch = $ch->next_sibling(); $ch = $ch->children(); $result['country'] = $ch[0]->content; $ch = $firstnode->next_sibling(); $ch = $ch->next_sibling(); $ch = $ch->next_sibling(); $ch = $ch->next_sibling(); $ch = $ch->children(); $result['code'] = $ch[0]->content; $ch = $firstnode->next_sibling(); $ch = $ch->next_sibling(); $ch = $ch->next_sibling(); $ch = $ch->next_sibling(); $ch = $ch->next_sibling(); $ch = $ch->next_sibling(); $ch = $ch->next_sibling(); $ch = $ch->next_sibling(); $ch = $ch->children(); $ch = $ch[1]->children(); $ch = $ch[1]->children(); $ch = $ch[1]->children(); $lnglat = split( ',', $ch[0]->content); $result['lng'] = $lnglat[0]; $result['lat'] = $lnglat[1]; // end of frustrating XML experience break; case 5: // use XPath to break apart the result into the interesting elements $xpath = new DOMXPath($this->doc); $entries = $xpath->query($query); # query = "every gml:name element anywhere in the document" $i = 1; foreach ($entries as $entry) { // first two gml:name entries are bogus if( $i++ < 2) continue; // get the values and save them in the instance $result['city'] = $entry->nodeValue; $result['country'] = $entry->nextSibling->nextSibling->nodeValue; $result['code'] = $entry->nextSibling->nextSibling->nextSibling->nextSibling->nodeValue; $entries = $xpath->query('//gml:coordinates'); # query = "every gml:name element anywhere in the document" foreach ($entries as $entry) { $lnglat = split( ',', $entry->nodeValue); $result['lng'] = $lnglat[0]; $result['lat'] = $lnglat[1]; break; } } break; } return $result; } } ?>
-
Hey guys. i have a link that looks like this blabla.php?this=that#$sb[id] When i click on the link i get exacly to the <div id='$sb[id]'> The only problem is that div loads on top of the page. Would it be possible to make it load in the middle instead?
-
thx kenrbnsn works great :-) You guys rock!
-
Hey guys i have a string that looks like this when it's submitted 1:3:4 Phoenix (cybermaster7 ) 932 1:12:15 Phoenix (Dealer ) 577 1:15:4 Phoenix (Dealer ) 577 1:15:11 M Phoenix (cybermaster7 ) 932 1:20:4 Phoenix (cybermaster7 ) 932 1:20:5 Phoenix (greenmask ) 1079 1:87:6 Phoenix (DIJEYO ) 1131 1:117:10 Phoenix (DIJEYO ) 1131 1:193:13 Phoenix (Daniman(i) ) 1140 1:193:15 Phoenix (Daniman(i) ) 1140 1:234:7 Phoenix (cyclops ) 934 1:244:6 Phoenix (SoDa(i) ) 1023 1:244:7 M Phoenix (SoDa(i) ) 1023 1:244:15 Phoenix (SoDa(i) ) 1023 1:307:4 Phoenix (monfabramar ) 449 1:329:7 Phoenix (Profeshor(i) ) 621 1:347:7 Phoenix (Profeshor(i) ) 621 1:390:8 Phoenix (cyclops ) 934 1:393:7 Phoenix (madnux ) 701 1:395:6 Phoenix (dormicum ) 1071 1:398:11 Phoenix (gparedes ) 383 1:428:7 Phoenix (HGentatsu ) 684 1:433:9 Phoenix (cyclops ) 934 1:460:6 Phoenix (DrOsS ) 1026 1:465:5 M Phoenix (gparedes ) 383 1:467:6 M Phoenix (juliuss ) 729 1:475:6 M Phoenix (dormicum ) 1071 1:483:11 M Phoenix (IRONHIDE ) 716 1:497:6 Phoenix (HGentatsu ) 684 2:2:4 Phoenix (DIJEYO ) 1131 2:40:9 Phoenix (AnIhC ) 867 2:50:6 Phoenix (AnIhC ) 867 2:50:12 Phoenix (AnIhC ) 867 2:52:6 Phoenix (AnIhC ) 867 2:53:9 Phoenix (AnIhC ) 867 2:73:7 Phoenix (AnIhC ) 867 2:93:6 M Phoenix (kakaroto ) 358 2:98:6 M Phoenix (juliuss ) 727 2:107:9 Phoenix (AnIhC ) 867 2:118:8 M Phoenix (dormicum ) 1069 2:122:14 Phoenix (dormicum ) 1069 2:133:5 Phoenix (DDuke ) 559 2:139:5 Phoenix (kakaroto ) 358 2:145:6 Phoenix (gparedes ) 384 2:148:4 Phoenix (AxL ) 373 2:148:5 Phoenix (HGentatsu ) 682 2:235:6 Phoenix (kakaroto ) 358 2:235:8 M Phoenix (Daniman(i) ) 1138 2:236:13 Phoenix (Daniman(i) ) 1138 2:236:14 M Phoenix (Daniman(i) ) 1138 2:236:15 Phoenix (Daniman(i) ) 1138 2:241:4 M Phoenix (kakaroto ) 358 2:242:6 Phoenix (gparedes ) 384 2:260:4 Phoenix (Profeshor(i) ) 620 2:279:10 Phoenix (DDuke ) 559 2:284:5 Phoenix (DDuke ) 559 2:305:8 Phoenix (DDuke ) 559 2:309:6 Phoenix (Machuchin ) 1141 2:316:7 Phoenix (Machuchin ) 1141 2:328:5 M Phoenix (DDuke ) 559 2:329:7 Phoenix (AnIhC ) 867 2:331:13 M Phoenix (butcher ) 477 2:338:5 Phoenix (Profeshor(i) ) 620 2:340:7 Phoenix (butcher ) 477 2:350:7 M Phoenix (butcher ) 477 2:356:14 Phoenix (butcher ) 477 2:358:9 Phoenix (butcher ) 477 2:359:10 M Phoenix (butcher ) 477 2:360:6 Phoenix (DrOsS ) 1024 2:377:4 Phoenix (SoDa(i) ) 1022 2:377:6 Phoenix (SoDa(i) ) 1022 2:382:4 M Phoenix (AxL ) 373 2:382:5 Phoenix (Profeshor(i) ) 620 2:382:6 Phoenix (AxL ) 373 2:382:7 Phoenix (Profeshor(i) ) 620 2:382:8 Phoenix (Viejo Lucho ) 674 2:382:12 Phoenix (Profeshor(i) ) 620 2:383:6 Phoenix (Profeshor(i) ) 620 2:384:4 M Phoenix (AxL ) 373 2:387:4 Phoenix (Profeshor(i) ) 620 2:392:5 Phoenix (Viejo Lucho ) 674 2:434:5 Phoenix (Machuchin ) 1141 2:446:7 Phoenix (SoDa(i) ) 1022 2:452:4 Phoenix (AxL ) 373 2:452:9 M Phoenix (AxL ) 373 2:452:11 M Phoenix (IRONHIDE ) 713 2:453:9 Phoenix (gparedes ) 384 2:455:5 Phoenix (juliuss ) 727 3:35:4 Phoenix (cybermaster7 ) 929 3:39:7 M Phoenix (Viejo Lucho ) 673 3:43:4 Phoenix (cybermaster7 ) 931 3:126:9 Phoenix (felipe ) 560 3:131:6 Phoenix (Viejo Lucho ) 673 3:147:14 Phoenix (Viejo Lucho ) 673 3:151:13 M Phoenix (Viejo Lucho ) 673 3:151:15 Phoenix (Viejo Lucho ) 673 3:153:5 Phoenix (Viejo Lucho ) 673 3:154:6 Phoenix (godo ) 840 3:173:9 M Phoenix (Machuchin ) 1138 3:177:6 Phoenix (kakaroto ) 357 3:178:15 Phoenix (Machuchin ) 1138 3:183:13 Phoenix (Andy9149 ) 1009 3:188:4 Phoenix (gparedes ) 383 3:207:5 Phoenix (Andy9149 ) 1009 3:207:9 M Phoenix (Logan ) 630 3:213:5 Phoenix (Logan ) 630 3:222:6 Phoenix (Logan ) 630 3:237:6 Phoenix (gparedes ) 383 3:261:7 Phoenix (kakaroto ) 357 3:262:6 Phoenix (destroyer1 ) 906 3:332:4 Phoenix (godo ) 840 3:336:4 M Phoenix (Andy9149 ) 1009 3:337:8 M Phoenix (DDuke ) 558 3:351:6 Phoenix (Andy9149 ) 1009 3:359:9 M Phoenix (kakaroto ) 357 3:359:11 Phoenix (IRONHIDE ) 713 3:360:5 Phoenix (kakaroto ) 357 3:364:5 Phoenix (cybermaster7 ) 929 3:364:9 M Phoenix (AxL ) 372 3:369:7 Phoenix (SoDa(i) ) 1021 3:383:7 M Phoenix (DIJEYO ) 1136 3:399:6 Phoenix (SoDa(i) ) 1021 3:421:5 Phoenix (cyclops ) 935 3:447:6 Phoenix (DIJEYO ) 1136 3:463:9 M Phoenix (juliuss ) 726 3:476:5 M Phoenix (butcher ) 476 3:486:6 M Phoenix (cyclops ) 934 3:493:8 Phoenix (butcher ) 476 4:7:7 Phoenix (Dealer ) 579 4:12:5 Phoenix (Dealer ) 579 4:12:12 M Phoenix (Dealer ) 579 4:15:8 M Phoenix (Dealer ) 590 4:16:6 Phoenix (Dealer ) 590 4:19:6 Phoenix (DIJEYO ) 1130 4:25:5 Phoenix (Dealer ) 579 4:26:12 Phoenix (IRONHIDE ) 713 4:29:6 Phoenix (Logan ) 626 4:30:6 M Phoenix (kakaroto ) 355 4:33:6 Phoenix (gparedes ) 384 4:38:5 Phoenix (greenmask ) 1093 4:43:5 Phoenix (Machuchin ) 1138 4:43:6 Phoenix (DrOsS ) 1017 4:44:8 Phoenix (Machuchin ) 1149 4:46:12 Phoenix (Andy9149(i) ) 1018 4:51:11 Phoenix (DrOsS ) 1037 4:53:5 M Phoenix (AxL ) 373 4:53:7 Phoenix (Machuchin ) 1149 4:54:8 Phoenix (destroyer1 ) 919 4:55:14 Phoenix (dormicum ) 1069 4:57:6 Phoenix (dormicum ) 1069 4:57:9 M Phoenix (Orion ) 903 4:60:8 Phoenix (madnux ) 702 4:64:6 Phoenix (greenmask ) 1093 4:65:6 M Phoenix (gparedes ) 384 4:66:5 Phoenix (juliuss ) 735 4:66:13 Phoenix (HGentatsu ) 688 4:71:8 Phoenix (HGentatsu ) 681 4:76:8 M Phoenix (juliuss ) 735 4:78:6 M Phoenix (Andy9149(i) ) 1018 4:78:7 Phoenix (Logan ) 626 4:80:5 Phoenix (madnux ) 702 4:84:5 M Phoenix (Logan ) 626 4:88:5 Phoenix (destroyer1 ) 906 4:89:7 M Phoenix (Logan ) 630 4:97:6 M Phoenix (felipe ) 543 4:149:5 Phoenix (cybermaster7 ) 930 4:150:5 Phoenix (cybermaster7 ) 930 4:190:7 M Phoenix (felipe ) 543 4:190:13 Phoenix (IRONHIDE ) 725 4:199:5 M Phoenix (destroyer1 ) 919 4:235:7 Phoenix (Andy9149(i) ) 1018 4:254:4 Phoenix (godo ) 844 4:265:6 Phoenix (DDuke ) 576 4:289:5 Phoenix (godo ) 844 4:324:5 Phoenix (destroyer1 ) 919 4:362:4 Phoenix (Orion ) 911 4:362:5 Phoenix (Orion ) 911 4:362:6 Phoenix (Orion ) 911 4:394:5 Phoenix (madnux ) 702 4:394:6 M Phoenix (madnux ) 702 4:399:5 Phoenix (juliuss ) 735 4:410:6 M Phoenix (DDuke ) 576 4:414:6 Phoenix (SoDa(i) ) 1023 4:414:8 M Phoenix (godo ) 844 4:426:5 Phoenix (cyclops ) 934 4:448:10 Phoenix (godo ) 844 4:449:7 Phoenix (Viejo Lucho ) 676 4:475:7 Phoenix (cyclops ) 934 4:476:6 Phoenix (cyclops ) 934 4:479:5 Phoenix (cyclops ) 934 5:4:5 Phoenix (godo ) 844 5:4:7 Phoenix (monfabramar ) 449 5:9:6 Phoenix (godo ) 844 5:10:9 Phoenix (Machuchin ) 1147 5:12:6 M Phoenix (Dealer ) 590 5:23:7 M Phoenix (monfabramar ) 451 5:27:6 Phoenix (monfabramar ) 451 5:27:7 Phoenix (monfabramar ) 451 5:33:5 Phoenix (Andy9149(i) ) 1018 5:34:4 Phoenix (godo ) 844 5:35:9 Phoenix (monfabramar ) 451 5:53:6 Phoenix (destroyer1 ) 918 5:90:5 Phoenix (Logan ) 628 5:108:4 Phoenix (Logan ) 628 5:119:4 Phoenix (IRONHIDE ) 717 5:120:4 Phoenix (felipe ) 543 5:120:6 Phoenix (AxL ) 373 5:122:7 M Phoenix (DDuke ) 575 5:122:8 Phoenix (AnIhC ) 870 5:154:4 Phoenix (felipe ) 543 5:158:5 M Phoenix (DIJEYO ) 1129 5:178:6 Phoenix (felipe ) 543 5:264:4 Phoenix (greenmask ) 1093 5:264:6 Phoenix (greenmask ) 1093 5:301:5 Phoenix (felipe ) 543 5:351:5 Phoenix (IRONHIDE ) 717 5:351:7 Phoenix (DrOsS ) 1038 5:353:5 Phoenix (DrOsS ) 1038 5:393:7 Phoenix (madnux ) 701 5:398:6 Phoenix (felipe ) 543 5:431:5 Phoenix (butcher ) 480 6:1:4 Phoenix (Orion ) 913 6:22:7 Phoenix (greenmask ) 1093 6:22:8 Phoenix (greenmask ) 1093 6:27:6 M Phoenix (DrOsS ) 1038 6:32:6 Phoenix (greenmask ) 1087 6:32:7 Phoenix (greenmask ) 1087 6:128:6 M Phoenix (dormicum ) 1073 6:151:6 Phoenix (dormicum ) 1073 6:236:4 M Phoenix (monfabramar ) 451 6:242:5 Phoenix (monfabramar ) 451 6:242:6 Phoenix (monfabramar ) 451 6:282:8 Phoenix (IRONHIDE ) 720 6:307:4 Phoenix (destroyer1 ) 919 6:310:5 Phoenix (destroyer1 ) 919 6:397:5 Phoenix (destroyer1 ) 919 6:496:1 Phoenix (madnux ) 703 6:496:5 Phoenix (madnux ) 703 7:472:5 Phoenix (DrOsS ) 1033 7:472:6 Phoenix (DrOsS ) 1033 7:472:8 Phoenix (IRONHIDE ) 722 7:496:5 Phoenix (madnux ) 703 8:80:4 Phoenix (Orion ) 914 8:88:6 M Phoenix (juliuss ) 731 8:96:4 Phoenix (Orion ) 914 9:88:4 Phoenix (HGentatsu ) 685 9:88:5 M Phoenix (HGentatsu ) 685 9:88:6 M Phoenix (HGentatsu ) 685 9:89:4 Phoenix (DIJEYO ) 1136 9:90:5 Phoenix (HGentatsu ) 685 9:285:4 M Phoenix (Orion ) 913 9:308:4 Phoenix (Orion ) 913 How can i replace every space sections by 1 space?
-
How can i add a * at the beginning of every line submited in a text area ----- ----- ----- ----- Would en up to be *----- *----- *----- *-----
-
Hey guys, How can i replace X by _ between ( and ) in a giving string?
-
I think regex would be better then formating then redeformating. Regex would take the string and transform it into vars one shot with a smaller code. thanks for your help Blade280891, but if you dont know how that works, i don't think you can help me.