-
Posts
146 -
Joined
-
Last visited
Posts posted by ShivaGupta
-
-
i am working with this
$ch = curl_init('http://example.com'); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_exec($ch); $url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); echo $url;
that working fine....
if i want to fetch url from other sorce as
$turl = "http://example.com"; $ch = curl_init('$turl'); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,true); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); curl_exec($ch); $url = curl_getinfo($ch, CURLINFO_EFFECTIVE_URL); echo $url;
then output like
HTTP://$turl
i dont understand what is wrong plz help me........
-
you can use trim
$user = trim($matches[1], '"');
Or change your regex to only match the text within the quotes
if ( preg_match('/u":"([a-z0-9_]+)"}/i', $html,$matches) )
with this
$user = trim($matches[1], '"');
my provlem solved......
"Thanks a lot"
-
In that case use $user = $matches[1];
with this
$user = $matches[1];
i am geting
"PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV" //how to remoove " from string ?
-
Where is this 'u":"PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV"}] snippet of code from? You need to make it valid json syntax in order to decode it with json_decode
You can do
$json = '[{"u":"PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV"}]'; $data = json_decode($json, true); echo $data[0]['u'];
here is my code
if ( preg_match("/u\"\.*?)}/i", $html,$matches) ) { $user = $matches[0]; echo "<font color=green><b>".$user."</b><br></font>"; } else { echo "A match was not found."; } //returned u":"PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV"} //need only PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV
-
$json = 'u":"PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV"}]'; var_dump(json_decode($json)); var_dump(json_decode($json, true));
I AM GETING
NULL NULL
-
Want to explode A from B
Tryed myself but no luck
plz help
A
PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV
B
u":"PB4CwyDzE6FnnqDrnEoEPWIuC9_uWV"}]
-
My project requires OCR
so i want to install
imagemagic and TesseractOCR
on the my Vps Debian GNU/Linux 6.0 (Squeeze), 64-bit
with comond line.
Plz Help Me...
-
can i work with https://github.com/thiagoalessio/tesseract-ocr-for-php tesseract-ocr-for-php on shared hosting /
plz help me.
-
Hi,
I can't find the error in this code:
<?php$cat=$_REQUEST['cate'];if($cat==1 && $cat==2 && $cat==3 && $cat==4){require_once('OrderStatus.php');}elseif ($cat==5 && $cat==6){require_once('NoVal1.php');}?>Error:Parse error: syntax error, unexpected
What am I doing wrong?
this is a best option to post code <>
see magic
<?php $cat=$_REQUEST['cate']; if($cat==1 && $cat==2 && $cat==3 && $cat==4) { require_once('OrderStatus.php'); } elseif ($cat==5 && $cat==6) { require_once('NoVal1.php'); } ?>
-
@Shiva, by default the owner of "www" directory is "root", don't do this! Is it a public or local server?
this is a local server and i want to use for my pertional use n only for me..........but can i use in public server?
-
congrats... well deserved
Wow!!... you see AbraCadaver... your nomination let people without words
BTW: congrats... well deserved
ini_set("display_errors", 0);error_reporting(0);
-
....................................i am thinking about words for posting in this threed .......after done i will post here later..............sorry for my bad english..............
-
finly soleved by these commond...
chmod 777 /var/www chmod 777 /var/www/*
Thanks To All..
-
Some code is causing that.
here is line 192
$fh = fopen($path, 'x');
here is code
$abc=curl_exec($ch); $name=rand(0, 999999); $path='img/'.$name.'.png'; $fh = fopen($path, 'x'); fwrite($fh, $abc); fclose($fh); $st=file_get_contents($path);
-
The webserver user doesn't have permission to open img/120300.png on this server.
so plz tell how to give permission to open img ?
-
Some code is causing that.
that script working fine with other server only provlem with my new server .
-
I keep getting this error
Warning: fopen(img/120300.png): failed to open stream: Permission denied in /var/www/play/playall.php on line 192 Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/play/playall.php on line 193 Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/play/playall.php on line 194 Warning: file_get_contents(img/120300.png): failed to open stream: No such file or directory in /var/www/play/playall.php on line 196 Fatal error: Call to undefined function imagecreatefromstring() in /var/www/play/playall.php on line 197
with Apache 2 and PHP 5.3 on
-
Debian wiki will help you
ok i try that then my php ver is is 5.4 and i want 5.3.3-7 so help me again plz
-
want to install php
5.3.3-7in Debian GNU/Linux 6.0 (Squeeze), 64-bit with comond line...........plz help me
-
i geting Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.on go daddy linux shared hosting with php 5.3.....
i am working with a curl script that take 10 min to finish their work. and have many loops .. also i use this before all echo to get live output
for($k = 0; $k < 80000; $k++) echo ' '; // extra spaces to fill up browser buffer
most thing that script working fine with another linux hosting..........i have tryed 2 or 3 other hosting their that script working well ..
here is php ini @ go daddy
output_buffering = Off register_globals = off allow_url_fopen = on ignore_user_abort = On allow_url_include = On max_execution_time = 3000 expose_php = Off max_input_time = 3000 memory_limit = 512M variables_order = "EGPCS" extension_dir = ./ zlib.output_compression = Off implicit_flush = On allow_call_time_pass_reference = On safe_mode = Off safe_mode_gid = Off safe_mode_allowed_env_vars = PHP_ safe_mode_protected_env_vars = LD_LIBRARY_PATH upload_tmp_dir = /tmp precision = 12 SMTP = relay-hosting.secureserver.net url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=,fieldset=" ; Only uncomment zend optimizer lines if your application requires Zend Optimizer support ;[Zend] ;zend_optimizer.optimization_level=15 ;zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3 ;zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3 zend_extension=/usr/local/Zend/lib/Optimizer-3.3.3/ZendExtensionManager.so ;zend_extension_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3/ZendExtensionManager_TS.so ; -- Be very careful to not to disable a function which might be needed! ; -- Uncomment the following lines to increase the security of your PHP site. ;disable_functions = "highlight_file,ini_alter,ini_restore,openlog,passthru, ; phpinfo, exec, system, dl, fsockopen, set_time_limit, ; popen, proc_open, proc_nice,shell_exec,show_source,symlink"
so plz help me...to fix that provlem....
-
for($k = 0; $k < 80000; $k++)
echo ' '; // extra spaces to fill up browser buffer -
after downgred php 5.3 to PHP 5.2 Parse error: syntax error, unexpected ':' in index.php on line 88
but wih 5.3 their was no error
here is that 88 line...
relogin:
-
You can transfer your files using SFTP or SCP. On windows a good client to handle this is WinSCP. For other OS's, do some google searching and you'll find a solution.
Beyond just uploading the files though, you need to learn how to actually configure apache so it knows where to find the files, how to process them, etc. This is not something to learn via a simple forum post, you need to google for some tutorials on how to manage a LAMP server.
CPanel is a piece of software that you'd have to buy and install to manage your server. Unless you paid for it when you bought the VPS, it will not be available to you. You'll have to do everything manually via the command line.
verry verry thanks sir
-
How are you connecting to your vps via ssh? Isnt sftp or scp setup? Thats how you'll upload files to your vps.
By fault on debian Apache serves files from /var/www folder. This can be changed via apaches configuration in /etc/apache/sites-available/default.
i am using puty to conect via ssh............
Deprecated: Function ereg_replace() is deprecated in....
in Regex Help
Posted · Edited by ShivaGupta
here is code
plz help.........